-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
50 lines (49 loc) · 1.42 KB
/
vitest.config.ts
File metadata and controls
50 lines (49 loc) · 1.42 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
import { fileURLToPath } from 'node:url'
import { mergeConfig } from 'vite'
import { configDefaults, defineConfig } from 'vitest/config'
import viteConfig from './vite.config.app'
export default mergeConfig(
viteConfig,
defineConfig({
test: {
globals: true,
environment: 'jsdom',
exclude: [...configDefaults.exclude, 'e2e/*'],
root: fileURLToPath(new URL('./', import.meta.url)),
alias: {
'@/': new URL('./src/', import.meta.url).pathname,
},
transformMode: {
web: [/\.[jt]sx$/],
},
deps: {
inline: ['element-plus'],
},
setupFiles: ['./src/__test__/setup-tests.ts'],
reporters: ['default', 'junit'],
outputFile: './reports/junit.xml',
coverage: {
all: true,
reportsDirectory: './reports/coverage',
reporter: ['text', 'json', 'html', 'cobertura', 'lcov'],
include: ['src/**/*.{js,jsx,ts,tsx,vue}'],
exclude: [
'src/**/*.d.ts',
'**/__mocks__/**',
'**/__tests__/**',
'**/__test__/**',
'**/*.spec.ts',
'**/*.mock.ts',
'src/main.ts',
'src/print-module/print.ts',
'src/locales/**',
'**/router/routes.ts',
'**/router/index.ts',
'**/build-lang-files.js',
// Libs where we assume that they are tested by the maintainer
'src/libs/**',
],
},
},
}),
)