Skip to content

Commit

Permalink
Merge pull request #6 from erik1110/feature/api
Browse files Browse the repository at this point in the history
[feat] add first test
  • Loading branch information
erik1110 committed Jan 2, 2024
2 parents 7531a72 + e86028e commit d442e48
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
21 changes: 21 additions & 0 deletions src/app.controller.spec.ts
Original file line number Diff line number Diff line change
@@ -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>(AppController);
});

describe('root', () => {
it('should return "Hello World!"', () => {
expect(appController.root()).toBe('Health Check');
});
});
});

0 comments on commit d442e48

Please sign in to comment.