-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathvitest.config.js
More file actions
79 lines (78 loc) · 1.83 KB
/
vitest.config.js
File metadata and controls
79 lines (78 loc) · 1.83 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import { defineConfig } from 'vitest/config';
import { playwright } from '@vitest/browser-playwright';
export default defineConfig({
test: {
projects: [
{
test: {
name: 'node',
include: ['spec/*.js'],
exclude: ['spec/env/**', 'spec/.eslintrc.js'],
setupFiles: ['spec/env/node.js'],
globals: true,
},
},
{
test: {
name: 'tasks',
include: ['tasks/tests/*.test.js'],
exclude: ['tasks/tests/publish-to-aws.test.js'],
globals: true,
pool: 'forks',
},
},
{
test: {
name: 'rspack',
include: ['tests/rspack/*.test.js'],
globals: true,
},
},
{
test: {
name: 'publish',
include: ['tasks/tests/publish-to-aws.test.js'],
globals: true,
pool: 'forks',
},
},
{
test: {
name: 'browser',
include: ['spec/*.js'],
exclude: [
'spec/env/**',
'spec/.eslintrc.js',
'spec/precompiler.js',
'spec/spec.js',
'spec/source-map.js',
],
setupFiles: [
'spec/env/browser-vitest-pre.js',
'spec/env/browser-vitest.js',
],
globals: true,
browser: {
enabled: true,
provider: playwright(),
instances: [{ browser: 'chromium' }],
},
},
},
],
coverage: {
provider: 'v8',
include: ['lib/**/*.js'],
exclude: [
'lib/handlebars/compiler/source-node.browser.js',
'lib/handlebars/compiler/source-node.node.js',
],
thresholds: {
statements: 99,
branches: 98,
functions: 100,
lines: 99,
},
},
},
});