-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.mts
38 lines (35 loc) · 993 Bytes
/
vitest.config.mts
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
import {defineConfig} from 'vitest/config';
const isGithub = process.env.GITHUB_ACTIONS === 'true';
const isCI = process.env.CI === 'true' || isGithub;
const isReport = process.env.REPORT === 'true';
export default defineConfig({
test: {
isolate: false,
pool: 'threads',
fileParallelism: false,
watch: false,
silent: isCI,
passWithNoTests: true,
outputFile: {
html: '.test/html/index.html',
},
reporters: isGithub ? ['dot', 'github-actions']
: isReport ? ['default', 'html']
: ['basic' /* 'hanging-process' */],
coverage: {
all: true,
clean: true,
enabled: isReport || isCI,
provider: 'v8',
include: ['**/*.ts'],
reporter: isReport ? [['lcov', {}]]
: ['lcovonly'],
reportsDirectory: '.test/coverage',
},
// benchmark: {
// reporters: isCI ? ['verbose', 'json'] : 'default',
// outputFile: 'benchmark-results.json',
// },
testTimeout: 2_000,
},
});