-
Notifications
You must be signed in to change notification settings - Fork 5
/
vitest.config.ts
41 lines (40 loc) · 1.06 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
import path from 'path'
import { defineConfig } from 'vitest/config'
import Vue from '@vitejs/plugin-vue'
import AutoImportFunctions from 'unplugin-auto-import/vite'
import AutoImportComponents from 'unplugin-vue-components/vite'
export default defineConfig({
plugins: [
Vue(),
AutoImportFunctions ({ imports: [
'vue',
'vee-validate',
'vue-router',
'pinia',
], dts: 'auto-imports.d.ts' }),
AutoImportComponents({
dirs: ['src/components'],
dts: '.nuxt/components.d.ts',
}),
],
resolve: {
alias: {
'~': path.resolve(__dirname, './src'),
'@': path.resolve(__dirname, './src'),
},
},
test: {
coverage: {
provider: 'v8',
include: ['src/**/*.{vue,js,ts}'],
all: false,
reporter: ['html', 'clover', 'text', 'lcov'],
},
root: '.',
globals: true,
environment: 'happy-dom',
reporters: ['verbose', 'vitest-sonar-reporter'],
outputFile: 'test-report.xml',
setupFiles: './src/tests/unitTest/setup.ts',
},
})