feat(core): 集成全局异常过滤器、响应拦截器、Swagger文档、Helmet安全、限流器及TypeORM迁移支持,完善项目基础结构

This commit is contained in:
dayjoy
2026-03-11 14:39:09 +08:00
parent 886aa79be3
commit ee017f9250
14 changed files with 354 additions and 125 deletions

View File

@@ -1,25 +0,0 @@
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import request from 'supertest';
import { App } from 'supertest/types';
import { AppModule } from './../src/app.module';
describe('AppController (e2e)', () => {
let app: INestApplication<App>;
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!');
});
});