generator-nest-js-boilerplate
Version:
This generator will help you to build your own Nest.js Mongodb API using TypeScript 4
37 lines (31 loc) • 871 B
text/typescript
import { Test, TestingModule } from '@nestjs/testing';
import AuthController from './auth.controller';
import AuthService from './auth.service';
import UsersService from '@v1/users/users.service';
import { JwtService } from '@nestjs/jwt';
describe('Auth Controller', () => {
let controller: AuthController;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
controllers: [AuthController],
providers: [
{
provide: AuthService,
useValue: {},
},
{
provide: UsersService,
useValue: {},
},
{
provide: JwtService,
useValue: {},
},
],
}).compile();
controller = module.get<AuthController>(AuthController);
});
it('should be defined', () => {
expect(controller).toBeDefined();
});
});