forked from eyaltoledano/claude-task-master
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
61 lines (55 loc) · 1.29 KB
/
Copy pathvitest.config.ts
File metadata and controls
61 lines (55 loc) · 1.29 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
55
56
57
58
59
60
61
import { defineConfig } from 'vitest/config';
/**
* Root Vitest configuration for Task Master monorepo
* Provides shared defaults for all packages
* Individual packages can extend this config with package-specific settings
*/
export default defineConfig({
test: {
// Enable global test APIs (describe, it, expect, etc.)
globals: true,
// Default environment for all packages (Node.js)
environment: 'node',
// Common test file patterns
include: [
'tests/**/*.test.ts',
'tests/**/*.spec.ts',
'src/**/*.test.ts',
'src/**/*.spec.ts'
],
// Common exclusions
exclude: ['node_modules', 'dist', '.git', '.cache', '**/node_modules/**'],
// Coverage configuration
coverage: {
provider: 'v8',
enabled: true,
reporter: ['text', 'json', 'html'],
include: ['src/**/*.ts'],
exclude: [
'node_modules/',
'dist/',
'tests/',
'**/*.test.ts',
'**/*.spec.ts',
'**/*.d.ts',
'**/mocks/**',
'**/fixtures/**',
'**/types/**',
'vitest.config.ts',
'src/index.ts'
],
// Default thresholds (can be overridden per package)
thresholds: {
branches: 70,
functions: 70,
lines: 70,
statements: 70
}
},
// Test execution settings
testTimeout: 10000,
clearMocks: true,
restoreMocks: true,
mockReset: true
}
});