-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
46 lines (45 loc) · 1.43 KB
/
vitest.config.ts
File metadata and controls
46 lines (45 loc) · 1.43 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
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
include: ["**/*.test.ts", "**/*.spec.ts"],
coverage: {
provider: "v8",
enabled: !!process.env.CI,
clean: true,
include: ["lib/**/*.ts"],
reporter: ["text", "html"],
reportsDirectory: "coverage",
exclude: [
// Runtime configuration + platform-specific code that is not testable in this environment
"lib/CreateVectorBackend.ts",
"lib/WasmVectorBackend.ts",
"lib/WebGLVectorBackend.ts",
"lib/WebGPUVectorBackend.ts",
"lib/WebNNVectorBackend.ts",
// Pure type definitions (no executable JS generated)
"**/*.d.ts",
"**/types.ts",
"**/VectorBackend.ts",
"**/ModelProfile.ts",
"**/QueryResult.ts",
"**/WebNNTypes.*",
// Test and tooling files
"tests/**",
"benchmarks/**",
"scripts/**",
"docker/**",
"node_modules/**",
],
thresholds: {
// Enforce a minimum test coverage baseline. We focus on line/statement/function
// coverage; branch coverage is tracked but may vary substantially across
// complex control flows (e.g., optional platform APIs). Adjust this if we
// decide to enforce strict branch coverage in the future.
lines: 80,
functions: 80,
branches: 0,
statements: 80,
},
},
},
});