30 lines
873 B
TypeScript
30 lines
873 B
TypeScript
import { Test, TestingModule } from '@nestjs/testing';
|
|
import { TeamController } from './TeamController';
|
|
import { TeamModule } from './TeamModule';
|
|
import { TeamService } from './TeamService';
|
|
|
|
describe('TeamModule', () => {
|
|
let module: TestingModule;
|
|
|
|
beforeEach(async () => {
|
|
module = await Test.createTestingModule({
|
|
imports: [TeamModule],
|
|
}).compile();
|
|
});
|
|
|
|
it('should compile the module', () => {
|
|
expect(module).toBeDefined();
|
|
});
|
|
|
|
it('should provide TeamController', () => {
|
|
const controller = module.get<TeamController>(TeamController);
|
|
expect(controller).toBeDefined();
|
|
expect(controller).toBeInstanceOf(TeamController);
|
|
});
|
|
|
|
it('should provide TeamService', () => {
|
|
const service = module.get<TeamService>(TeamService);
|
|
expect(service).toBeDefined();
|
|
expect(service).toBeInstanceOf(TeamService);
|
|
});
|
|
}); |