-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
37 lines (35 loc) · 1.08 KB
/
vitest.config.ts
File metadata and controls
37 lines (35 loc) · 1.08 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
import path from 'node:path';
import { coverageConfigDefaults, defineConfig } from 'vitest/config';
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
test: {
coverage: {
exclude: [
'src/test/**',
'src/types/**',
'src/extension.ts',
...coverageConfigDefaults.exclude,
],
include: [ 'src/**/*.ts' ],
reporter: [ 'text', 'lcov' ],
thresholds: {
// autoUpdate means thresholds update ONLY if the new coverage is above the current threshold. Higher thresholds
// are always acceptable regardless of the task in progress. Lower thresholds are only acceptable with an
// extremely good reason; i.e. a new feature contains code that is impossible to hit via automated tests alone.
autoUpdate: true,
branches: 93.28,
functions: 99.05,
lines: 98.28,
statements: 98.22,
},
},
globals: false,
include: [ 'src/**/*.test.ts' ],
restoreMocks: true,
setupFiles: [ 'src/test/setup.ts' ],
},
});