feat: 增加全局错误捕捉及验证

This commit is contained in:
ilhamtahir committed 2024-11-17 21:14:07 +08:00
1 parent 235ca8c4aa
commit bbf5360ef7
22 files changed
+273 -40

No files matched your search

-24
View File
@@ -1,24 +0,0 @@
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import * as request from 'supertest';
import { AppModule } from './../src/app.module';
describe('AppController (e2e)', () => {
let app: INestApplication;
beforeEach(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleFixture.createNestApplication();
await app.init();
});
it('/ (GET)', () => {
return request(app.getHttpServer())
.get('/')
.expect(200)
.expect('Hello World!');
});
});