-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathvitest.config.ts
More file actions
37 lines (35 loc) · 1012 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
37 lines (35 loc) · 1012 Bytes
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
import { defineConfig } from 'vitest/config';
export const CRITICAL_COVERAGE_THRESHOLDS = {
'src/commands/project.ts': {
statements: 90,
branches: 70,
functions: 100,
lines: 90,
},
// Preserve explicit floors for high-risk mutation and recovery boundaries.
// Raise these as focused command-contract coverage lands.
'src/commands/operation.ts': { lines: 55 },
'src/commands/team.ts': { lines: 59 },
'src/commands/workflow.ts': { lines: 58 },
'src/runtime/operation-recovery-store.ts': { lines: 55 },
} as const;
export default defineConfig({
test: {
environment: 'node',
include: ['tests/**/*.test.ts'],
maxWorkers: 2,
coverage: {
provider: 'v8',
reporter: ['text', 'text-summary', 'lcov'],
include: ['src/**/*.ts'],
exclude: ['src/index.ts', 'src/version.ts'],
thresholds: {
statements: 80,
branches: 72,
functions: 90,
lines: 80,
...CRITICAL_COVERAGE_THRESHOLDS,
},
},
},
});