Skip to content

Commit

Permalink
test: dont overwrite root package.json when running bun-ipc-inherit.t…
Browse files Browse the repository at this point in the history
…est.ts (#15126)
  • Loading branch information
nektro authored Nov 13, 2024
1 parent c5df329 commit 956853f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/js/bun/spawn/bun-ipc-inherit.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { spawn } from "bun";
import { expect, it } from "bun:test";
import { bunExe, isWindows } from "harness";
import { bunExe, isWindows, tmpdirSync } from "harness";
import fs from "node:fs/promises";
import path from "path";

it.todoIf(isWindows)("spawning a bun package script should inherit the ipc fd", async () => {
const x = tmpdirSync();
await fs.writeFile(
path.join(process.cwd(), "package.json"),
path.join(x, "package.json"),
JSON.stringify({
scripts: {
test: `${bunExe()} -e 'process.send("hello")'`,
Expand All @@ -21,6 +22,7 @@ it.todoIf(isWindows)("spawning a bun package script should inherit the ipc fd",
testMessage = message;
},
stdio: ["inherit", "inherit", "inherit"],
cwd: x,
});

await child.exited;
Expand Down

0 comments on commit 956853f

Please sign in to comment.