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); }); describe('healthcheck', () => { it('should return "OK"', () => { expect(appController.healthcheck()).toBe('OK'); }); }); describe('version', () => { it('should return "OK"', () => { expect(appController.healthcheck()).toBe(process.env.APP_VERSION); }); }); });