Spaces:
Sleeping

lab / src /bin /app.controller.spec.ts
den1904
feat!: add MD5 hash generation functionality
e00a29f
Raw History Blame Contribute Delete
695 Bytes
import { Test, TestingModule } from '@nestjs/testing';
import { AppController } from './app.controller';
import { AppService } from './app.service';
describe('AppController', () => {
let appController: AppController;
beforeEach(async () => {
const app: TestingModule = await Test.createTestingModule({
controllers: [AppController],
providers: [AppService],
}).compile();
appController = app.get<AppController>(AppController);
});
describe('root', () => {
it('should return "Hello World!"', () => {
const versionSpy = jest.spyOn(appController, 'version');
appController.version();
expect(versionSpy).toHaveBeenCalled();
});
});
});