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