feat(student-bff): 完整实现 student-bff 聚合层
包含 src 全部实现、Dockerfile、shared-ts/bff 包等
This commit is contained in:
44
services/student-bff/vitest.config.ts
Normal file
44
services/student-bff/vitest.config.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Vitest 配置 - student-bff 单元测试.
|
||||
*
|
||||
* 仲裁依据:
|
||||
* - workline §3.2 P3.9 (单元测试覆盖率≥80%)
|
||||
* - project_rules §3.1 (零错误通过)
|
||||
*
|
||||
* 覆盖范围:
|
||||
* - Resolver: auth/dashboard/homework/grades/exams/classes/content/analytics/notifications/ai
|
||||
* - Guard: authorization.guard
|
||||
* - DataLoader: data-loader.module
|
||||
* - Shared: action-state, cache, application-error, global-error.filter
|
||||
*/
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: "node",
|
||||
include: ["src/**/*.test.ts"],
|
||||
coverage: {
|
||||
provider: "v8",
|
||||
reporter: ["text", "json", "html"],
|
||||
include: [
|
||||
"src/student/resolvers/**/*.ts",
|
||||
"src/student/guards/**/*.ts",
|
||||
"src/student/dataloaders/**/*.ts",
|
||||
"src/shared/**/*.ts",
|
||||
],
|
||||
exclude: [
|
||||
"src/**/*.module.ts",
|
||||
"src/**/*.test.ts",
|
||||
"src/main.ts",
|
||||
"src/config/mock-data.ts",
|
||||
],
|
||||
thresholds: {
|
||||
lines: 80,
|
||||
functions: 80,
|
||||
branches: 70,
|
||||
statements: 80,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user