1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix computeUnixShellEnv tests (#6532)

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-11-07 12:35:19 -08:00 committed by GitHub
parent c00b548d61
commit 077c49f97d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 5 deletions

View File

@ -133,7 +133,7 @@ const computeUnixShellEnvironmentInjectable = getInjectable({
} else { } else {
resolve({ resolve({
callWasSuccessful: false, callWasSuccessful: false,
error: `Failed to spawn ${shellPath}: ${getErrorContext({ error })}`, error: `Failed to spawn ${shellPath}: ${getErrorContext({ error: String(error) })}`,
}); });
} }
}); });

View File

@ -127,7 +127,11 @@ describe("computeUnixShellEnvironment technical tests", () => {
it("should resolve with a failed call", async () => { it("should resolve with a failed call", async () => {
await expect(unixShellEnv).resolves.toEqual({ await expect(unixShellEnv).resolves.toEqual({
callWasSuccessful: false, callWasSuccessful: false,
error: `Failed to spawn ${shellPath}: Error: some-error`, error: `Failed to spawn ${shellPath}: ${JSON.stringify({
error: "Error: some-error",
stdout: "",
stderr: "",
}, null, 4)}`,
}); });
}); });
}); });
@ -229,7 +233,11 @@ describe("computeUnixShellEnvironment technical tests", () => {
it("should resolve with a failed call", async () => { it("should resolve with a failed call", async () => {
await expect(unixShellEnv).resolves.toEqual({ await expect(unixShellEnv).resolves.toEqual({
callWasSuccessful: false, callWasSuccessful: false,
error: `Failed to spawn ${shellPath}: Error: some-error`, error: `Failed to spawn ${shellPath}: ${JSON.stringify({
error: "Error: some-error",
stdout: "",
stderr: "",
}, null, 4)}`,
}); });
}); });
}); });
@ -330,7 +338,11 @@ describe("computeUnixShellEnvironment technical tests", () => {
it("should resolve with a failed call", async () => { it("should resolve with a failed call", async () => {
await expect(unixShellEnv).resolves.toEqual({ await expect(unixShellEnv).resolves.toEqual({
callWasSuccessful: false, callWasSuccessful: false,
error: `Failed to spawn ${shellPath}: Error: some-error`, error: `Failed to spawn ${shellPath}: ${JSON.stringify({
error: "Error: some-error",
stdout: "",
stderr: "",
}, null, 4)}`,
}); });
}); });
}); });
@ -430,7 +442,11 @@ describe("computeUnixShellEnvironment technical tests", () => {
it("should resolve with a failed call", async () => { it("should resolve with a failed call", async () => {
await expect(unixShellEnv).resolves.toEqual({ await expect(unixShellEnv).resolves.toEqual({
callWasSuccessful: false, callWasSuccessful: false,
error: `Failed to spawn ${shellPath}: Error: some-error`, error: `Failed to spawn ${shellPath}: ${JSON.stringify({
error: "Error: some-error",
stdout: "",
stderr: "",
}, null, 4)}`,
}); });
}); });
}); });