Repository navigation
Expand file tree
/
Copy pathvitest.config.ts
More file actions
34 lines (33 loc) · 1.6 KB
/
Copy pathvitest.config.ts
File metadata and controls
34 lines (33 loc) · 1.6 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
import { defaultExclude, defineConfig } from "vitest/config";
export default defineConfig({
test: {
// Globbed by tinyglobby relative to the project root, so this one is correctly
// anchored and must stay relative. It is load-bearing at the repo root: without it
// the agent worktrees under `.claude/worktrees/` are collected too (75 files
// instead of 15). Note that a CLI `--exclude` appends to this list rather than
// replacing it, so you cannot A/B this entry from the command line.
exclude: [...defaultExclude, ".claude/**"],
// Tests run real codegen (hey-api generation, TypeScript programs), which is
// multi-second work; under CI runner contention the 5s default flakes.
testTimeout: 30_000,
coverage: {
// Scope coverage with `include`, not `exclude`. `coverage.exclude` is matched
// against absolute paths with picomatch's `contains` option, so every relative
// spelling of a `.claude/**` ignore (`./.claude/**`, `/.claude/**`, `**/.claude/**`)
// also matches the project's own root when the repo is checked out under a
// `.claude/` path — e.g. a git worktree in `.claude/worktrees/`. That excluded every
// source file and silently passed the thresholds below against 0/0. `include` is
// anchored to the project root, so it has no such failure mode.
include: ["src/**"],
exclude: ["src/cli.mts"],
reporter: ["text", "json-summary", "json", "html"],
reportOnFailure: true,
thresholds: {
lines: 95,
functions: 95,
statements: 95,
branches: 90,
},
},
},
});