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); expect(controller).toBeDefined(); expect(controller).toBeInstanceOf(DriverController); }); it('should provide DriverService', () => { const service = module.get(DriverService); expect(service).toBeDefined(); expect(service).toBeInstanceOf(DriverService); }); });