fix: Gate E2E — Test.createTestingModule 缺少 Reflector provider
Some checks failed
Deploy API Server / build-and-unit (push) Successful in 34s
Deploy API Server / current-integration (push) Successful in 30s
Deploy API Server / backward-compat (push) Successful in 1s
Deploy API Server / m-ai-03-synthetic-e2e (push) Failing after 11s
Deploy API Server / deploy (push) Has been skipped
Some checks failed
Deploy API Server / build-and-unit (push) Successful in 34s
Deploy API Server / current-integration (push) Successful in 30s
Deploy API Server / backward-compat (push) Successful in 1s
Deploy API Server / m-ai-03-synthetic-e2e (push) Failing after 11s
Deploy API Server / deploy (push) Has been skipped
AdminAuthGuard 依赖 Reflector(@nestjs/core),TestingModule 不会自动导入。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
dfbf91382b
commit
2f5989be49
@ -1,5 +1,6 @@
|
|||||||
import { Test, TestingModule } from '@nestjs/testing';
|
import { Test, TestingModule } from '@nestjs/testing';
|
||||||
import { INestApplication } from '@nestjs/common';
|
import { INestApplication } from '@nestjs/common';
|
||||||
|
import { Reflector } from '@nestjs/core';
|
||||||
import { JwtService } from '@nestjs/jwt';
|
import { JwtService } from '@nestjs/jwt';
|
||||||
import request from 'supertest';
|
import request from 'supertest';
|
||||||
import { AppModule } from '../src/app.module';
|
import { AppModule } from '../src/app.module';
|
||||||
@ -43,6 +44,7 @@ describe('M-AI-03 GATE E2E (fail-closed)', () => {
|
|||||||
// AppModule.init() 连接 Prisma + Redis — 失败则测试 fail-closed
|
// AppModule.init() 连接 Prisma + Redis — 失败则测试 fail-closed
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
const module: TestingModule = await Test.createTestingModule({
|
||||||
imports: [AppModule],
|
imports: [AppModule],
|
||||||
|
providers: [Reflector],
|
||||||
}).compile();
|
}).compile();
|
||||||
|
|
||||||
app = module.createNestApplication();
|
app = module.createNestApplication();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user