Skip to content

Commit 7588123

Browse files
authored
Update Process List test to handle insider builds (#1448)
The process names for insider versions of VS Code are slightly different from the release versions. Update the test to account for this. Issue: #1442
1 parent 3a7b448 commit 7588123

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

test/integration-tests/process-list/processList.test.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,26 @@ suite("ProcessList Tests", () => {
2727
test("retreives the list of available processes", async function () {
2828
// We can guarantee that certain VS Code processes will be present during tests
2929
const processes = await createProcessList().listAllProcesses();
30+
let processNameDarwin: string = "Code";
31+
let processNameWin32: string = "Code";
32+
let processNameLinux: string = "code";
33+
if (process.env["VSCODE_VERSION"] === "insiders") {
34+
processNameDarwin = "Code - Insiders";
35+
processNameWin32 = "Code - Insiders";
36+
processNameLinux = "code-insiders";
37+
}
3038
switch (process.platform) {
3139
case "darwin":
32-
expectProcessName(processes, "Code Helper");
33-
expectProcessName(processes, "Code Helper (GPU)");
34-
expectProcessName(processes, "Code Helper (Plugin)");
35-
expectProcessName(processes, "Code Helper (Renderer)");
40+
expectProcessName(processes, `${processNameDarwin} Helper`);
41+
expectProcessName(processes, `${processNameDarwin} Helper (GPU)`);
42+
expectProcessName(processes, `${processNameDarwin} Helper (Plugin)`);
43+
expectProcessName(processes, `${processNameDarwin} Helper (Renderer)`);
3644
break;
3745
case "win32":
38-
expectProcessName(processes, "Code.exe");
46+
expectProcessName(processes, `${processNameWin32}.exe`);
3947
break;
4048
case "linux":
41-
expectProcessName(processes, "code");
49+
expectProcessName(processes, `${processNameLinux}`);
4250
break;
4351
default:
4452
this.skip();

0 commit comments

Comments
 (0)