Files
Edu/services/parent-bff/vitest.config.ts
SpecialX 2229309a1e feat: initialize parent-bff service with full core features
add complete parent-bff implementation including:
- GraphQL endpoint with depth/cost validation
- ChildGuard越权校验 with redis cache and singleflight
- parallel orchestration with partial failure fallback
- three-level cache fallback strategy (Redis + LRU + downstream)
- Kafka consumer for cache invalidation and notification push
- opossum circuit breaker for downstream services
- Prometheus metrics and SLO alerts
- Helm chart for k8s deployment with multi-environment configs
- Grafana dashboard for observability
- complete unit and integration tests
2026-07-10 18:49:06 +08:00

53 lines
1.6 KiB
TypeScript

import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
globals: true,
environment: "node",
include: ["test/**/*.test.ts"],
exclude: ["node_modules", "dist"],
testTimeout: 15000,
hookTimeout: 30000,
coverage: {
provider: "v8",
reporter: ["text", "text-summary", "lcov"],
include: ["src/**/*.ts"],
exclude: [
"src/main.ts",
"src/app.module.ts",
"src/**/*.module.ts",
"src/clients/**/*.ts",
"src/dataloader/**/*.ts",
"src/graphql/context.ts",
"src/graphql/schema.ts",
"src/graphql/types.ts",
"src/graphql/yoga.ts",
"src/graphql/resolvers/index.ts",
"src/graphql/resolvers/me.resolver.ts",
"src/graphql/resolvers/notification.resolver.ts",
"src/graphql/resolvers/notification-preference.resolver.ts",
"src/graphql/resolvers/grade.resolver.ts",
"src/shared/cache/redis.client.ts",
"src/shared/kafka/kafka.consumer.ts",
"src/shared/kafka/handlers/event-handler.ts",
"src/shared/kafka/handlers/notification-push.handler.ts",
"src/shared/observability/logger.ts",
"src/shared/observability/tracer.ts",
"src/shared/errors/global-error.filter.ts",
"src/entry/context.middleware.ts",
"src/entry/graphql.controller.ts",
"src/types/graphql-depth-limit.d.ts",
],
thresholds: {
statements: 80,
branches: 80,
functions: 80,
lines: 80,
},
},
},
esbuild: {
target: "es2022",
},
});