generated from meza/create-meza-cli
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvitest.config.ts
39 lines (36 loc) · 936 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
import isCi from 'is-ci';
import { defineConfig } from 'vitest/config';
const testReporters = ['default'];
const coverageReporters = ['text'];
if (!isCi) {
// testReporters.push('verbose');
coverageReporters.push('html');
} else {
testReporters.push('junit');
coverageReporters.push('cobertura');
}
export default defineConfig({
cacheDir: '.cache',
test: {
globalSetup: './test/globalSetup.ts',
dir: 'src',
testTimeout: 10000,
watch: false,
outputFile: 'reports/junit.xml',
reporters: testReporters,
isolate: true,
coverage: {
include: ['src/**/*.ts'],
exclude: ['**/*.testGameVersion.ts', '**/__mocks__/**.*', '**/*.d.ts', '**/*.test.ts'],
all: true,
reportsDirectory: './reports/coverage/unit',
reporter: coverageReporters,
thresholds: {
branches: 100,
functions: 100,
lines: 100,
statements: 100
}
}
}
});