-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.vscode-test.mjs
More file actions
109 lines (107 loc) · 2.5 KB
/
Copy path.vscode-test.mjs
File metadata and controls
109 lines (107 loc) · 2.5 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import { defineConfig } from '@vscode/test-cli';
const root = process.cwd();
const e2eFiles = 'out/test/e2e/**/*.test.js';
const heavyFiles = 'out/test/heavy/**/*.test.js';
const unitFiles = 'out/test/unit/**/*.test.js';
const baseLaunchArgs = [
'--disable-workspace-trust',
'--new-window',
'--skip-release-notes',
'--skip-welcome',
];
const quietLaunchArgs = [
...baseLaunchArgs,
'--disable-updates',
'--disable-gpu',
];
export default defineConfig([
{
label: 'e2e-ci',
files: e2eFiles,
launchArgs: [
...quietLaunchArgs,
'--user-data-dir',
`${root}/.vscode-test/user-data-e2e-ci`,
],
env: {
GSC_E2E_MODE: 'ci',
GSC_DISABLE_TELEMETRY: '1',
},
mocha: {
ui: 'bdd',
timeout: 30000,
reporter: 'mocha-junit-reporter',
reporterOptions: {
mochaFile: 'test-results/e2e-results.xml',
suiteTitleSeparatedBy: ' > ',
},
},
},
{
label: 'e2e-manual',
files: e2eFiles,
launchArgs: [
...baseLaunchArgs,
'--user-data-dir',
`${root}/.vscode-test/user-data-e2e-manual`,
'--profile',
'Git Smart Checkout E2E Manual',
],
env: {
GSC_E2E_MODE: 'manual',
GSC_DISABLE_TELEMETRY: '1',
GSC_E2E_VISUAL_DELAY_MS: process.env.GSC_E2E_VISUAL_DELAY_MS ?? '750',
},
mocha: {
ui: 'bdd',
timeout: 120000,
reporter: 'spec',
},
},
{
label: 'e2e-heavy',
files: heavyFiles,
launchArgs: [
...quietLaunchArgs,
'--user-data-dir',
`${root}/.vscode-test/user-data-e2e-heavy`,
],
env: {
GSC_E2E_MODE: 'ci',
GSC_DISABLE_TELEMETRY: '1',
},
mocha: {
ui: 'bdd',
// Heavy fixtures build a ~28-file repo with several branches and a bare
// remote per test, so allow a larger budget than the standard e2e suite.
timeout: 60000,
...(process.env.CI && {
reporter: 'mocha-junit-reporter',
reporterOptions: {
mochaFile: 'test-results/heavy-results.xml',
suiteTitleSeparatedBy: ' > ',
},
}),
},
},
{
label: 'unit',
files: unitFiles,
launchArgs: [
...quietLaunchArgs,
'--user-data-dir',
`${root}/.vscode-test/user-data-unit`,
],
mocha: {
ui: 'bdd',
timeout: 10000,
...(process.env.CI && {
reporter: 'mocha-junit-reporter',
reporterOptions: {
mochaFile: 'test-results/unit-results.xml',
suiteTitleSeparatedBy: ' > ',
},
}),
},
},
]);