aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/process/process.test.js
diff options
context:
space:
mode:
authorGravatar Ai Hoshino <ambiguous404@gmail.com> 2023-10-02 03:55:38 +0800
committerGravatar GitHub <noreply@github.com> 2023-10-01 12:55:38 -0700
commitf7618aba20aa112cd56c4196fb40f3648975f8da (patch)
tree2aacd3d20f067b34770c5c7ba176c9b6db85fd01 /test/js/node/process/process.test.js
parente020ecec1596192b6e6ffe8453094e37e95a85ef (diff)
downloadbun-f7618aba20aa112cd56c4196fb40f3648975f8da.tar.gz
bun-f7618aba20aa112cd56c4196fb40f3648975f8da.tar.zst
bun-f7618aba20aa112cd56c4196fb40f3648975f8da.zip
fix(node:process): fix return value of `process.kill` (#6207)
Diffstat (limited to 'test/js/node/process/process.test.js')
-rw-r--r--test/js/node/process/process.test.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/js/node/process/process.test.js b/test/js/node/process/process.test.js
index a4a8862a2..4fb678dce 100644
--- a/test/js/node/process/process.test.js
+++ b/test/js/node/process/process.test.js
@@ -407,7 +407,8 @@ describe("signal", () => {
stdout: "pipe",
});
const prom = child.exited;
- process.kill(child.pid, "SIGTERM");
+ const ret = process.kill(child.pid, "SIGTERM");
+ expect(ret).toBe(true);
await prom;
expect(child.signalCode).toBe("SIGTERM");
});
@@ -418,7 +419,8 @@ describe("signal", () => {
stdout: "pipe",
});
const prom = child.exited;
- process.kill(child.pid, 9);
+ const ret = process.kill(child.pid, 9);
+ expect(ret).toBe(true);
await prom;
expect(child.signalCode).toBe("SIGKILL");
});