-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathvitest.config.ts
More file actions
48 lines (46 loc) · 1.2 KB
/
vitest.config.ts
File metadata and controls
48 lines (46 loc) · 1.2 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
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['test/**/*.test.ts'],
exclude: [
'node_modules/**',
'.opencode/**',
'dist/**',
'tmp/**',
'**/node_modules/**',
'**/.opencode/**',
'**/dist/**',
'**/tmp/**',
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: ['node_modules/', 'dist/', 'test/'],
thresholds: {
// Global coverage floor.
statements: 80,
branches: 80,
functions: 80,
lines: 80,
// Per-file coverage floor for the production source tree. Set below the
// global average so legitimate low-coverage utility files do not block
// work, while still catching regressions where a single file drops
// sharply. Raise these once individual modules stabilise.
'lib/**/*.ts': {
statements: 70,
branches: 70,
functions: 70,
lines: 70,
},
'index.ts': {
statements: 70,
branches: 70,
functions: 70,
lines: 70,
},
},
},
},
});