Skip to content

Commit 418baa1

Browse files
committed
test(desktop): check packaged executable during cache preparation
1 parent ebd4aac commit 418baa1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎scripts/lib/server-compile-cache.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ it("prepares macOS x64 cache on an ARM64 build host", async () => {
5353
`
5454
const childProcess = require("node:child_process");
5555
const spawn = childProcess.spawnSync;
56-
childProcess.spawnSync = (executable, args, options) => spawn(process.execPath, args, options);
56+
childProcess.spawnSync = (executable, args, options) => {
57+
require("node:assert/strict").equal(executable, ${JSON.stringify(NodePath.join(root, "Fixture.app", "Contents", "MacOS", "Fixture"))});
58+
return spawn(process.execPath, args, options);
59+
};
5760
Object.defineProperty(process, "platform", { value: "darwin" });
5861
Object.defineProperty(process, "arch", { value: "arm64" });
5962
require(${JSON.stringify(hook)})({

0 commit comments

Comments
 (0)