import { Test , TestingModule } from '@nestjs/testing' ; import { UserController } from './user.controller' ; import { UserService } from './user.service' ; describe ( 'UserController' , ( ) => { let controller ; beforeEach ( async ( ) => { const module = await Test . createTestingModule ( { controllers : [ UserController ] , providers : [ UserService ] , } ) . compile ( ) ; controller = module . get < UserController > ( UserController ) ; } ) ; it ( 'should be defined' , ( ) => { expect ( controller ) . toBeDefined ( ) ; } ) ; } ) ;