-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
26 lines (26 loc) · 1.01 KB
/
Copy pathvitest.config.ts
File metadata and controls
26 lines (26 loc) · 1.01 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
import { defineConfig } from "vitest/config";
export default defineConfig({
// apps/web's tsconfig says jsx: "preserve" (Next compiles it); the guard suite imports the /q page, so vitest
// compiles JSX itself with the automatic runtime
oxc: { jsx: { runtime: "automatic" } },
test: {
// fast-check property suites run 10,000+ cases; 5 s is too tight on a loaded runner
testTimeout: 60_000,
include: ["packages/**/test/**/*.test.ts"],
environment: "node",
coverage: {
provider: "v8",
include: ["packages/core/src/**", "apps/web/lib/**"],
reporter: ["text", "lcov"],
reportsDirectory: "coverage",
thresholds: { statements: 100, branches: 100, functions: 100, lines: 100 },
},
},
resolve: {
alias: {
"@sentwrong/core": new URL("./packages/core/src/index.ts", import.meta.url).pathname,
// guard.test.ts drives the web route handler directly (apps/web uses `@/` for its own root)
"@": new URL("./apps/web", import.meta.url).pathname,
},
},
});