-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
43 lines (41 loc) · 1.21 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
42
43
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';
export default defineConfig({
plugins: [vue()],
resolve: {
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src/main/webapp/app') }],
},
test: {
reporters: ['json', 'verbose', 'vitest-sonar-reporter'],
outputFile: {
'vitest-sonar-reporter': 'target/test-results/TESTS-results-sonar.xml',
},
globals: true,
logHeapUsage: true,
minThreads: 1,
maxThreads: 2,
environment: 'jsdom',
cache: false,
include: ['src/test/javascript/spec/**/*.(spec|test).(ts|tsx)'],
exclude: ['node_modules', 'src/test/javascript/integration/**/*.spec.ts'],
coverage: {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
clean: true,
exclude: ['src/main/webapp/**/*.component.ts'],
provider: 'istanbul',
reportsDirectory: 'target/test-results/',
reporter: ['html', 'json-summary', 'text', 'text-summary', 'lcov', 'clover'],
watermarks: {
statements: [100, 100],
branches: [100, 100],
functions: [100, 100],
lines: [100, 100],
},
},
},
});