-
-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathvitest.config.ts
More file actions
49 lines (46 loc) · 1.33 KB
/
vitest.config.ts
File metadata and controls
49 lines (46 loc) · 1.33 KB
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
45
46
47
48
49
import {tmpdir} from 'os';
import {resolve} from 'path';
import {coverageConfigDefaults, defineConfig} from 'vitest/config';
export default defineConfig({
test: {
environment: 'happy-dom',
execArgv: [
'--localstorage-file',
resolve(tmpdir(), `vitest-${process.pid}.localstorage`),
],
setupFiles: ['test/vitest/setup.ts'],
reporters: [['test/vitest/reporter.ts', {hideSkipped: true}]],
slowTestThreshold: 3000,
maxWorkers: 10,
passWithNoTests: true,
testTimeout: 20000,
retry: 10,
coverage: {
enabled: false,
provider: 'istanbul',
exclude: coverageConfigDefaults.exclude.filter((e) => e !== 'dist/**'),
include: ['dist/index.js', 'dist/ui-react/index.js'],
reportsDirectory: './tmp/coverage',
reporter: ['text-summary', 'json-summary', 'html'],
},
onUnhandledError: ({message}) =>
message !== 'Invariant: worker WS endpoint not found',
projects: [
{
extends: true,
test: {
name: 'unit',
include: ['test/unit/**/*.test.ts', 'test/unit/**/*.test.tsx'],
},
},
{
extends: true,
test: {name: 'perf', include: ['test/perf/**/*.test.ts']},
},
{
extends: true,
test: {name: 'prod', include: ['test/prod/**/*.test.ts']},
},
],
},
});