Files
bun.sh/test/js/node/child_process/child_process_ipc.test.js
2025-05-06 22:12:24 -07:00

16 lines
480 B
JavaScript

import { $ } from "bun";
import { bunExe } from "harness";
test("child_process ipc", async () => {
const output = await $`${bunExe()} ${import.meta.dir}/fixtures/ipc_fixture.js`.text();
// node (v23.4.0) has identical output
expect(output).toMatchInlineSnapshot(`
"Parent received: {"status":"Child process started"}
Child process exited with code 0
send returned false
uncaughtException ERR_IPC_CHANNEL_CLOSED
cb ERR_IPC_CHANNEL_CLOSED
"
`);
});