/**
 * 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,
      },
    },
  },
});
