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 authored and GitHub committed 2022-11-07 15:35:19 -05:00
1 parent c00b548d61
commit 077c49f97d
2 files changed
+21 -5

No files matched your search

@@ -133,7 +133,7 @@ const computeUnixShellEnvironmentInjectable = getInjectable({
} else {
resolve({
callWasSuccessful: false,
error: `Failed to spawn ${shellPath}: ${getErrorContext({ error })}`,
error: `Failed to spawn ${shellPath}: ${getErrorContext({ error: String(error) })}`,
});
}
});
@@ -127,7 +127,11 @@ describe("computeUnixShellEnvironment technical tests", () => {
it("should resolve with a failed call", async () => {
await expect(unixShellEnv).resolves.toEqual({
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 () => {
await expect(unixShellEnv).resolves.toEqual({
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 () => {
await expect(unixShellEnv).resolves.toEqual({
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 () => {
await expect(unixShellEnv).resolves.toEqual({
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)}`,
});
});
});