-
Notifications
You must be signed in to change notification settings - Fork 97
/
vitest.workspace.js
78 lines (77 loc) · 1.92 KB
/
vitest.workspace.js
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
import { defineWorkspace } from 'vitest/config'
import vitestConfig from './vitest.config'
export default defineWorkspace([
{
test: {
...vitestConfig.test,
include: ['test/unit/**/*.{test,spec}.ts'],
name: 'unit',
setupFiles: ['./vitest.setup.ts', './vitest.setup.unit.ts'],
environment: 'node',
maxConcurrency: 10,
},
},
{
test: {
...vitestConfig.test,
include: ['lib/**/*.test-d.ts'],
name: 'types',
maxConcurrency: 10,
typecheck: {
enabled: true,
},
},
},
{
test: {
...vitestConfig.test,
include: ['test/integration/**/*.{test,spec}.ts'],
name: 'integration',
setupFiles: ['./vitest.setup.ts'],
environment: 'node',
maxConcurrency: 1,
testTimeout: 60000,
hookTimeout: 60000,
bail: 100,
},
teardownTimeout: 120000,
slowTestThreshold: 1000,
},
{
test: {
...vitestConfig.test,
include: ['test/unit/**/*.{test,spec}.ts'],
name: 'browser-unit',
setupFiles: ['./vitest.setup.browser.ts', './vitest.setup.ts', './vitest.setup.unit.ts'],
maxConcurrency: 10,
browser: {
enabled: true,
provider: 'playwright',
name: 'chromium',
},
},
},
{
test: {
...vitestConfig.test,
include: ['test/integration/**/*.{test,spec}.ts'],
name: 'browser-integration',
setupFiles: ['./vitest.setup.browser.ts', './vitest.setup.ts'],
browser: {
enabled: true,
provider: 'playwright',
name: 'chromium',
},
env: {
CONTENTFUL_INTEGRATION_TEST_CMA_TOKEN: process.env.CONTENTFUL_INTEGRATION_TEST_CMA_TOKEN,
CONTENTFUL_ORGANIZATION_ID: process.env.CONTENTFUL_ORGANIZATION_ID,
},
maxConcurrency: 1,
testTimeout: 60000,
hookTimeout: 60000,
bail: 100,
},
teardownTimeout: 120000,
slowTestThreshold: 1000,
},
])