-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
48 lines (47 loc) · 1.27 KB
/
vitest.config.ts
File metadata and controls
48 lines (47 loc) · 1.27 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
/// <reference types="vitest" />
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// Look for test files in the packages directory and the new tests/ folders
include: [
'packages/**/tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
'packages/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
],
// Only run tests for files that actually contain tests
exclude: ['**/node_modules/**', '**/dist/**'],
globals: true,
environment: 'node',
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
include: ['packages/**/src/**/*.{js,ts}'],
exclude: [
'packages/**/src/types/**',
'packages/**/dist/**',
'packages/**/node_modules/**',
'**/*.test.{js,ts}',
'**/*.spec.{js,ts}',
],
thresholds: {
global: {
statements: 70,
branches: 60,
functions: 80,
lines: 70,
},
'packages/**/src/loaders/**': {
statements: 75,
branches: 65,
functions: 85,
lines: 75,
},
'packages/**/src/utils/**': {
statements: 50,
branches: 40,
functions: 60,
lines: 50,
},
},
},
},
});