-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvitest.config.ts
67 lines (66 loc) · 1.96 KB
/
vitest.config.ts
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
58
59
60
61
62
63
64
65
66
67
import { defineConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
import os from 'node:os';
export default defineConfig({
plugins: [tsconfigPaths()],
test: {
include: ['./tests/unit/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
exclude: ['./tests/e2e/**/*'],
// bail: 10,
// dir: './tests/unit',
silent: true,
maxConcurrency: 100,
testTimeout: 20e3,
coverage: {
reporter: ['text', 'json', 'html', 'lcov'],
enabled: true,
processingConcurrency:
os.availableParallelism?.() ?? os.cpus().length,
include: ['src/**/*.ts'],
exclude: [
'**/node_modules/**',
'**/tests/**',
'**/dist/**',
'**/coverage/**',
'**/*.config.{ts,js,cjs,mjs,jsx,tsx}',
'**/*.d.ts',
'**/external/**',
'**/examples/**',
'**/e2e-old/**',
'**/src/types/**',
'**/legacy/**',
'**/html/**',
],
ignoreEmptyLines: true,
reportOnFailure: true,
},
reporters: [
'default',
'github-actions',
'html',
// 'basic',
// 'dot',
// 'hanging-process',
// 'json',
// 'junit',
// 'tap',
// 'tap-flat',
// 'verbose',
],
// ui: true,
env: {
NODE_ENV: 'development',
},
// globals: true, // fixes VS Code Vitest extension issues (see https://github.com/vitest-dev/vscode/issues/47)
},
// logLevel: 'silent',
// customLogger: {
// error: () => {},
// warn: () => {},
// info: () => {},
// clearScreen: () => {},
// hasErrorLogged: () => false,
// hasWarned: false,
// warnOnce: () => {},
// },
});