fix(test): use direct Node launcher on macOS
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { packageHopperEnvironment } from "../scripts/verify-package-environment.mjs";
|
||||
|
||||
describe("package installation workflows", () => {
|
||||
it("runs package E2E without the retired native rebuild script", async () => {
|
||||
@@ -77,4 +78,27 @@ describe("package installation workflows", () => {
|
||||
expect(canary).toContain('mkdtemp(join(tmpdir(), "rea-published-canary-")');
|
||||
expect(canary).toContain("cwd: canaryRoot");
|
||||
});
|
||||
|
||||
it("uses direct Node ownership on macOS and Windows", () => {
|
||||
const root = "/tmp/rea-package";
|
||||
const expected = {
|
||||
HOPPER_LAUNCHER_PATH: process.execPath,
|
||||
HOPPER_LOADER_ARGS_JSON: JSON.stringify([
|
||||
`${root}/tests/fixtures/fakeLauncher.mjs`,
|
||||
]),
|
||||
};
|
||||
|
||||
expect(packageHopperEnvironment(root, "darwin")).toEqual(expected);
|
||||
expect(packageHopperEnvironment(root, "win32")).toEqual(expected);
|
||||
expect(packageHopperEnvironment(root, "linux")).toEqual({
|
||||
HOPPER_LAUNCHER_PATH: "/bin/sh",
|
||||
HOPPER_LOADER_ARGS_JSON: JSON.stringify([
|
||||
"-c",
|
||||
'node_path=$1; shift; "$node_path" "$@"',
|
||||
"rea-package-hopper",
|
||||
process.execPath,
|
||||
`${root}/tests/fixtures/fakeLauncher.mjs`,
|
||||
]),
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user