-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvitest.config.ts
More file actions
63 lines (61 loc) · 1.85 KB
/
Copy pathvitest.config.ts
File metadata and controls
63 lines (61 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import path from "node:path";
import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
const rootDir = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(rootDir, "src"),
},
},
test: {
include: ["src/**/*.test.ts"],
exclude: ["src/**/*.integration.test.ts"],
env: {
SKIP_ENV_VALIDATION: "1",
// `@/lib/ai/tools/code/delegation` builds a regex from `env.GITHUB_ORG`
// at module-load time, so tests importing anything in the code-subagent
// chain need it defined before their first import evaluates.
GITHUB_ORG: "purduehackers",
},
coverage: {
provider: "istanbul",
include: ["src/**/*.ts"],
exclude: [
"src/app/**",
"src/env.ts",
"src/server/**",
"src/workflows/**",
"src/bot/handlers/**",
"src/bot/integrations/**",
"src/lib/ascii.ts",
"src/lib/test/**",
"src/lib/protocol/utils.ts",
"src/**/*.test.ts",
"src/**/errors.ts",
"src/**/types.ts",
"src/**/enums.ts",
"src/**/constants.ts",
"src/lib/ai/skills/generated/**",
"src/lib/ai/tools/**",
"src/lib/evlog.ts",
"src/lib/db/**",
// Thin wrappers around @vercel/sandbox / factory wiring. Covered by
// hooks.ts + integration tests — unit coverage here would be 90%
// SDK-glue assertions against mocks.
"src/lib/sandbox/vercel-sandbox.ts",
"src/lib/sandbox/factory.ts",
"src/lib/sandbox/provider.ts",
"src/lib/sandbox/lifecycle-starter.ts",
"src/lib/sandbox/session-deps.ts",
],
reporter: ["text", "lcov"],
thresholds: {
statements: 90,
branches: 85,
functions: 90,
lines: 90,
},
},
},
});