-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.ts
41 lines (41 loc) · 947 Bytes
/
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
/// <reference types="vitest" />
import { defineConfig } from 'vitest/config'
import Vue from '@vitejs/plugin-vue'
import VueJsx from '@vitejs/plugin-vue-jsx'
import VueMacros from 'unplugin-vue-macros'
export default defineConfig({
plugins: [
VueMacros.vite({
setupComponent: false,
setupSFC: false,
plugins: {
vue: Vue(),
vueJsx: VueJsx(),
},
}),
],
optimizeDeps: {
disabled: true,
},
test: {
globals: true,
clearMocks: true,
// environment: 'jsdom',
environment: 'happy-dom',
reporters: ['default', 'vitest-sonar-reporter'],
// testTransformMode: {
// web:
// },
// transformMode: {
// web: [/\.[jt]sx$/],
// },
outputFile: {
'vitest-sonar-reporter': './vitest-report/sonar-report.xml',
},
coverage: {
provider: 'v8',
reporter: 'lcov',
reportsDirectory: './vitest-report/coverage',
},
},
})