-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.js
More file actions
59 lines (58 loc) · 1.43 KB
/
vitest.config.js
File metadata and controls
59 lines (58 loc) · 1.43 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
49
50
51
52
53
54
55
56
57
58
59
import { defineConfig } from 'vitest/config';
import { resolve } from 'path';
export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./tests/setup.js'],
include: [
'tests/**/*.{test,spec}.{js,ts}',
'src/**/*.{test,spec}.{js,ts}',
'**/__tests__/**/*.{js,ts}'
],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/cypress/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
'tests/e2e/**'
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'coverage/**',
'dist/**',
'**/node_modules/**',
'**/tests/**',
'**/*.config.*',
'**/*.d.ts'
],
thresholds: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70
}
}
},
testTimeout: 10000,
hookTimeout: 10000,
teardownTimeout: 5000
},
resolve: {
alias: {
'@': resolve(__dirname, '.'),
'@/core': resolve(__dirname, 'core'),
'@/services': resolve(__dirname, 'services'),
'@/utils': resolve(__dirname, 'utils'),
'@/providers': resolve(__dirname, 'providers')
}
},
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'test'),
global: 'globalThis'
}
});