mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 11:26:02 +00:00
fix(cli): browser ensure fails when the unzip leaves no Chrome executable (#5329)
* fix(cli): browser ensure fails when the unzip leaves no Chrome executable * refactor(cli): keep install debug output and report only the last unzip attempt * fix(cli): browser ensure exits after a failure or a --force download * fix(cli): browser checks name why Chrome could not be installed * fix(cli): render shows why its setup step failed instead of a crash dump * refactor(cli): build the browser download label and staged test path once * refactor(cli): one owner for the render setup result line * fix(cli): render setup failures report through one error line * refactor(cli): one reader and writer for both render setup lines
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { existsSync, mkdtempSync, readFileSync, rmSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { runCancellableProcess } from "./cancellableProcess.js";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { runCancellableProcess, runRenderSetupWorker } from "./cancellableProcess.js";
|
||||
import { testProcessIsAlive, waitForTestCondition } from "./processTestUtils.js";
|
||||
|
||||
const IS_POSIX = process.platform !== "win32";
|
||||
@@ -79,3 +79,16 @@ describe.skipIf(!IS_POSIX)("cancellable process tree teardown", () => {
|
||||
}
|
||||
}, 5_000);
|
||||
});
|
||||
|
||||
describe("render setup worker failure", () => {
|
||||
it("rejects with only the worker's reason, not its crash output", async () => {
|
||||
const stderr = vi.spyOn(process.stderr, "write").mockImplementation(() => true);
|
||||
try {
|
||||
const failure = runRenderSetupWorker("bogus" as "lint", {}, {});
|
||||
|
||||
await expect(failure).rejects.toThrow(/^Unknown render setup mode: bogus$/);
|
||||
} finally {
|
||||
stderr.mockRestore();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user