Fix: e2e test
Build and push image / release-image (push) Successful in 1m38s

This commit is contained in:
ytshih committed 2025-07-10 18:25:38 +08:00
1 parent 4e3ac71c78
commit 4d7049a30a
2 files changed
+6 -4

No files matched your search

+2 -1
View File
@@ -1,4 +1,5 @@
import { Test, TestingModule } from '@nestjs/testing';
import { ConfigService } from '@nestjs/config';
import { AppController } from './app.controller';
import { AppService } from './app.service';
@@ -8,7 +9,7 @@ describe('AppController', () => {
beforeEach(async () => {
const app: TestingModule = await Test.createTestingModule({
controllers: [AppController],
providers: [AppService],
providers: [ConfigService, AppService],
}).compile();
appController = app.get<AppController>(AppController);
+4 -3
View File
@@ -1,5 +1,6 @@
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import * as request from 'supertest';
import { App } from 'supertest/types';
import { AppModule } from './../src/app.module';
@@ -16,10 +17,10 @@ describe('AppController (e2e)', () => {
await app.init();
});
it('/ (GET)', () => {
it('/healthz (GET)', () => {
return request(app.getHttpServer())
.get('/')
.get('/healthz')
.expect(200)
.expect('Hello World!');
.expect('OK');
});
});