-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathvitest.projects.ts
More file actions
73 lines (65 loc) · 1.47 KB
/
vitest.projects.ts
File metadata and controls
73 lines (65 loc) · 1.47 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
import { playwright } from "@vitest/browser-playwright";
export const testPackages = ["packages/**/*.{test,spec}.?(c|m)[jt]s?(x)"];
export const liveTestPackages = [
"packages/**/*.{test,spec}.live.?(c|m)[jt]s?(x)"
];
export const excludePackages = [
"packages/**/*.{test,spec}.live.?(c|m)[jt]s?(x)"
];
export const nodeConfig = {
test: {
name: { label: "node", color: "cyan" },
include: testPackages,
exclude: excludePackages
}
};
export const browserHeadlessConfig = {
test: {
name: { label: "headless", color: "magenta" },
browser: {
enabled: true,
provider: playwright(),
headless: true,
instances: [
{ browser: "chromium" },
{ browser: "firefox" },
{ browser: "webkit" }
]
},
include: testPackages,
exclude: excludePackages
}
};
export const browserHeadedConfig = {
test: {
name: { label: "browser", color: "blue" },
browser: {
enabled: true,
provider: playwright(),
instances: [
{ browser: "chromium" },
{ browser: "firefox" },
{ browser: "webkit" }
]
},
include: testPackages
}
};
export const nodeLiveConfig = {
test: {
name: "nodeLive",
include: liveTestPackages
}
};
export const headlessLiveConfig = {
test: {
name: "headlessLive",
browser: {
enabled: true,
provider: playwright(),
headless: true,
instances: [{ browser: "chromium" }]
},
include: liveTestPackages
}
};