import { Test } from '@nestjs/testing' ; import { AppService } from './app.service' ; describe ( 'AppService' , ( ) => { let service ; beforeAll ( async ( ) => { const app = await Test . createTestingModule ( { providers : [ AppService ] , } ) . compile ( ) ; service = app . get < AppService > ( AppService ) ; } ) ; it ( 'should be defined' , ( ) => { expect ( service ) . toBeDefined ( ) ; } ) ; } ) ;