-
-
Notifications
You must be signed in to change notification settings - Fork 91
/
vitest.config.mjs
57 lines (53 loc) · 1.68 KB
/
vitest.config.mjs
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
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'vitest/config';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
const defaultConfig = {
test: {
chaiConfig: {
truncateThreshold: 80,
},
// cspell:ignore tsup
exclude: [
'**/temp/**',
'**/node_modules/**',
'**/dist/**',
'**/cypress/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
],
// reporters: 'verbose',
watchExclude: ['**/node_modules/**', '**/dist/**', '**/.temp/**', '**/temp/**', '**/coverage/**'],
coverage: {
// enabled: true,
provider: 'istanbul',
clean: true,
all: true,
reportsDirectory: 'coverage',
reporter: ['html', 'json', ['lcov', { projectRoot: __dirname }], 'text'],
exclude: [
'_snapshots_',
'.coverage/**',
'.eslint*',
'.prettier*',
'**/*.d.cts',
'**/*.d.mts',
'**/*.d.ts',
'**/*.test.*',
'**/*.config.*',
'**/fixtures/**',
'**/perf/**',
'**/*.perf.*',
'**/samples/**',
'**/test*/**',
'**/test.*',
'ajv.config.*',
'bin.cjs',
'bin.js',
'bin.mjs',
'coverage',
'vitest*',
],
},
},
};
export default defineConfig(defaultConfig);