-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
27 lines (26 loc) · 809 Bytes
/
vitest.config.ts
File metadata and controls
27 lines (26 loc) · 809 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
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
// Use V8 for fast native coverage instrumentation
coverage: {
provider: "v8",
// Coverage is only collected from source files under src/,
// excluding test files, generated dist, and legacy entry points.
include: ["src/**/*.ts"],
exclude: [
"src/**/__tests__/**",
"src/test-*.ts",
"src/index.ts", // legacy entry point, excluded from tsconfig
],
// Fail the CI run if overall coverage drops below these thresholds.
// Raise these incrementally as coverage improves.
thresholds: {
statements: 60,
lines: 60,
functions: 60,
branches: 50,
},
reporter: ["text", "lcov", "html"],
},
},
});