23 lines
639 B
TypeScript
23 lines
639 B
TypeScript
import { Test, TestingModule } from '@nestjs/testing';
|
|
import { AuthController } from './auth.controller';
|
|
import { AuthService } from './services/auth.service';
|
|
|
|
describe('AuthController', () => {
|
|
let authController: AuthController;
|
|
|
|
beforeEach(async () => {
|
|
const app: TestingModule = await Test.createTestingModule({
|
|
controllers: [AuthController],
|
|
providers: [AuthService],
|
|
}).compile();
|
|
|
|
authController = app.get<AuthController>(AuthController);
|
|
});
|
|
|
|
describe('root', () => {
|
|
it('should return "Hello World!"', () => {
|
|
expect(authController.getHello()).toBe('Hello World!');
|
|
});
|
|
});
|
|
});
|