-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvitest.config.ts
More file actions
61 lines (60 loc) · 1.39 KB
/
vitest.config.ts
File metadata and controls
61 lines (60 loc) · 1.39 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'
import { resolve } from 'path'
export default defineConfig({
test: {
environment: 'node',
globals: false,
include: ['tests/**/*.{test,spec}.ts'],
exclude: [
'node_modules',
'dist',
'bin',
'scripts'
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
include: ['src/**/*.ts'],
exclude: [
'src/**/*.d.ts',
'src/**/*.test.ts',
'src/**/*.spec.ts',
'src/utils/orahelper.ts',
'src/types/file-upload.ts',
'src/types/build-logs.ts'
],
// Separate thresholds for different test types
thresholds: {
global: {
branches: 75,
functions: 70,
lines: 75,
statements: 75
},
// Unit tests should have higher coverage
'tests/unit/**': {
branches: 85,
functions: 85,
lines: 85,
statements: 85
},
// Integration tests focus on workflows
'tests/integration/**': {
branches: 60,
functions: 60,
lines: 60,
statements: 60
}
}
},
testTimeout: 15000,
hookTimeout: 10000,
setupFiles: ['./tests/setup/test-setup.ts']
},
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
'@tests': resolve(__dirname, 'tests')
}
}
})