-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.config.ts
More file actions
54 lines (53 loc) · 1.42 KB
/
vitest.config.ts
File metadata and controls
54 lines (53 loc) · 1.42 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
47
48
49
50
51
52
53
54
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['tests/**/*.test.ts'],
// Run integration tests sequentially to avoid file system conflicts
fileParallelism: false,
// Use single thread pool to avoid coverage file conflicts on Windows
pool: 'forks',
poolOptions: {
forks: {
singleFork: true,
},
},
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
include: ['src/**/*.ts'],
exclude: [
'src/**/*.d.ts',
'src/bin/**',
// Exclude re-export index files (no logic, just exports)
'src/**/index.ts',
// Exclude pure type definition files
'src/**/*.types.ts',
'src/**/*types.ts',
// Exclude MCP tool definition files (mostly schema definitions)
'src/**/*.tool-defs.ts',
],
reportsDirectory: './coverage',
clean: true,
// Coverage thresholds - CI will fail if below these values
// Current state: 50%+ overall (1464 tests)
thresholds: {
statements: 50,
branches: 50,
functions: 50,
lines: 50,
},
},
testTimeout: 600000, // 10 minutes for E2E integration tests
hookTimeout: 30000, // 30s for hooks
typecheck: {
tsconfig: './tsconfig.test.json',
},
},
resolve: {
alias: {
'@': '/src',
},
},
});