forked from aziontech/azion-console-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.js
44 lines (43 loc) · 1.05 KB
/
vitest.config.js
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
import { fileURLToPath } from 'node:url'
import { mergeConfig, defineConfig } from 'vite'
import { configDefaults } from 'vitest/config'
import viteConfig from './vite.config'
export default mergeConfig(
viteConfig,
defineConfig({
test: {
environment: 'jsdom',
passWithNoTests: true,
exclude: [
...configDefaults.exclude,
'e2e/*',
'cypress',
'azion',
'.vscode',
'.husky',
'.vite',
'.github',
'docs',
'public'
],
root: fileURLToPath(new URL('./', import.meta.url)),
transformMode: {
web: [/\.[jt]sx$/]
},
coverage: {
enabled: true,
include: ['src/services/**', 'src/views/**', 'src/helpers/**'],
statements: 81,
branches: 90,
functions: 81,
lines: 81,
reporter: ['text', 'lcov']
},
reporters: ['default', 'vitest-sonar-reporter'],
outputFile: {
'vitest-sonar-reporter': './coverage/sonar-report.xml'
},
testTimeout: 30000
}
})
)