From c0f40ed81a1c932f804ba62e635249cd43c31273 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Sat, 20 Apr 2024 18:55:07 +0530 Subject: fix(ext/node): implement process.kill in Rust (#23130) Closes https://github.com/denoland/deno/issues/23056 --- tests/unit_node/process_test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts index f32303002..0ae0c2a7a 100644 --- a/tests/unit_node/process_test.ts +++ b/tests/unit_node/process_test.ts @@ -235,6 +235,18 @@ Deno.test({ }, }); +Deno.test( + { permissions: { run: true, read: true } }, + async function processKill() { + const p = new Deno.Command(Deno.execPath(), { + args: ["eval", "setTimeout(() => {}, 10000)"], + }).spawn(); + + process.kill(p.pid); + await p.status; + }, +); + Deno.test({ name: "process.off signal", ignore: Deno.build.os == "windows", -- cgit v1.2.3