-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
80 lines (79 loc) · 1.93 KB
/
Copy pathvitest.config.ts
File metadata and controls
80 lines (79 loc) · 1.93 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { defineConfig } from 'vitest/config';
import vue from '@vitejs/plugin-vue';
import { fileURLToPath, URL } from 'node:url';
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src/renderer', import.meta.url)),
'@core': fileURLToPath(new URL('./src/core', import.meta.url)),
'@electron': fileURLToPath(new URL('./electron', import.meta.url)),
'@shared': fileURLToPath(new URL('./src/renderer/shared', import.meta.url)),
'@modules': fileURLToPath(new URL('./src/renderer/modules', import.meta.url)),
'@services': fileURLToPath(new URL('./src/services', import.meta.url)),
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./tests/setup.ts'],
include: [
'src/**/*.spec.ts',
'src/**/*.test.ts',
'tests/unit/**/*.spec.ts',
'tests/integration/**/*.spec.ts',
],
exclude: [
'node_modules',
'dist',
'dist-electron',
'e2e/**/*',
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
reportsDirectory: './coverage',
exclude: [
'node_modules/',
'dist/',
'dist-electron/',
'e2e/',
'**/*.spec.ts',
'**/*.test.ts',
'**/types/**',
'**/*.d.ts',
'tests/**',
'scripts/**',
'electron/**',
],
thresholds: {
lines: 70,
functions: 70,
branches: 65,
statements: 70,
},
},
testTimeout: 30000,
hookTimeout: 30000,
pool: 'forks',
poolOptions: {
forks: {
singleFork: true,
},
},
// Mock modules that don't work in jsdom
deps: {
inline: [
'vue',
'@vue',
'pinia',
'@vueuse',
],
},
// Reporter configuration
reporters: ['default', 'html'],
outputFile: {
html: './coverage/test-report.html',
},
},
});