import { Test , TestingModule } from '@nestjs/testing' ; import { AppController } from './app.controller' ; describe ( 'AppController' , ( ) => { let appController ; beforeEach ( async ( ) => { const app = await Test . createTestingModule ( { controllers : [ AppController ] , } ) . compile ( ) ; appController = app . get < AppController > ( AppController ) ; } ) ; describe ( 'root' , ( ) => { it ( 'should return "Hello World!"' , ( ) => { expect ( appController . getHello ( ) ) . toEqual ( { status : 'ok' } ) ; } ) ; } ) ; } ) ;