-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.workspace.ts
72 lines (71 loc) · 1.65 KB
/
vitest.workspace.ts
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
import { defineWorkspace } from 'vitest/config';
export default defineWorkspace([
{
extends: './packages/components/vite.config.ts',
test: {
name: '@lun-web/components',
globals: true,
root: './packages/components',
setupFiles: ['../../utils/testSetup.ts'], // it's relative to root, must be set here, not in vite.config.ts
browser: {
enabled: true,
name: 'chromium',
provider: 'playwright',
// https://playwright.dev
providerOptions: {},
},
},
},
{
extends: './packages/core/vite.config.ts',
test: {
name: '@lun-web/core',
globals: true,
root: './packages/core',
environment: 'happy-dom',
},
},
{
extends: './packages/theme/vite.config.ts',
test: {
name: '@lun-web/theme',
globals: true,
root: './packages/theme',
environment: 'happy-dom',
},
},
{
extends: './packages/utils/vite.config.ts',
test: {
name: '@lun-web/utils',
globals: true,
root: './packages/utils',
environment: 'node',
},
},
{
extends: './packages/plugins/vite.config.ts',
test: {
name: '@lun-web/plugins',
globals: true,
root: './packages/plugins',
environment: 'happy-dom',
},
},
{
extends: './packages/react/vite.config.ts',
test: {
name: '@lun-web/react',
globals: true,
root: './packages/react',
setupFiles: ['../../utils/reactTestSetup.ts'],
browser: {
enabled: true,
name: 'chromium',
provider: 'playwright',
// https://playwright.dev
providerOptions: {},
},
},
},
]);