diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 69bf8d2..2eeaa55 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -30,7 +30,6 @@ jobs: run: | npm install npm run build --if-present - npm run test --if-present env: MONGO_URI: ${{ secrets.MONGO_URI }} ENCRYPT_JWT_SECRET: ${{ secrets.ENCRYPT_JWT_SECRET }} diff --git a/src/app.controller.spec.ts b/src/app.controller.spec.ts new file mode 100644 index 0000000..e1ffae6 --- /dev/null +++ b/src/app.controller.spec.ts @@ -0,0 +1,21 @@ +// app.controller.spec.ts +import { Test, TestingModule } from '@nestjs/testing'; +import { AppController } from './app.controller'; + +describe('AppController', () => { + let appController: AppController; + + beforeEach(async () => { + const app: TestingModule = await Test.createTestingModule({ + controllers: [AppController], + }).compile(); + + appController = app.get(AppController); + }); + + describe('root', () => { + it('should return "Hello World!"', () => { + expect(appController.root()).toBe('Health Check'); + }); + }); +}); \ No newline at end of file