-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.js
More file actions
32 lines (29 loc) · 1 KB
/
vitest.config.js
File metadata and controls
32 lines (29 loc) · 1 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
import path from 'node:path';
import {fileURLToPath} from 'node:url';
import {defineConfig} from 'vitest/config';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@tests': path.resolve(__dirname, './tests'),
},
},
test: {
coverage: {
provider: 'v8', // Uses the V8 engine for native performance
reporter: ['text', 'json', 'html'], // Generates terminal output and a browsable HTML report
include: ['src/**/*.ts'], // Only track coverage for your source code
exclude: ['node_modules/**', 'tests/**'], // Ignore external libs and tests themselves
// intentinally keeping the coverage low for now as we just added test cases
thresholds: {
lines: 95,
functions: 100,
branches: 90,
statements: 95,
},
},
setupFiles: ['./tests/setup.ts'],
exclude: ['**/node_modules/**', '**/build/**', '**/dist/**'],
},
});