-
Notifications
You must be signed in to change notification settings - Fork 213
Expand file tree
/
Copy pathvitest.config.ts
More file actions
58 lines (56 loc) · 1.36 KB
/
vitest.config.ts
File metadata and controls
58 lines (56 loc) · 1.36 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
50
51
52
53
54
55
56
57
58
import { defineConfig, mergeConfig, type ViteUserConfig } from 'vitest/config';
const configExtension: { [key: string]: ViteUserConfig } = {
unit: defineConfig({
test: {
include: ['packages/*/src/**/*.test.ts'],
coverage: {
enabled: true,
reporter: ['text', 'json-summary', 'json'],
reportOnFailure: true,
include: [
'packages/cli/src/**/*.ts',
'packages/core/src/**/*.ts',
'packages/respect-core/src/**/*.ts',
],
provider: 'istanbul',
exclude: [
'packages/**/__tests__/**/*',
'packages/cli/src/index.ts',
'packages/cli/src/utils/assert-node-version.ts',
],
thresholds: {
lines: 79,
functions: 82,
statements: 78,
branches: 71,
},
},
},
}),
e2e: defineConfig({
test: {
include: ['tests/e2e/**/*.test.ts'],
},
}),
'smoke-rebilly': defineConfig({
test: {
include: ['tests/smoke/rebilly/**/*.smoke.ts'],
},
}),
default: defineConfig({}),
};
export default mergeConfig(
defineConfig({
test: {
globals: true,
restoreMocks: true,
mockReset: true,
environment: 'node',
env: {
FORCE_COLOR: '1',
REDOCLY_TELEMETRY: 'off',
},
},
}),
configExtension[process.env.VITEST_SUITE || 'default']
);