diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-04-20 18:55:07 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-20 18:55:07 +0530 |
commit | c0f40ed81a1c932f804ba62e635249cd43c31273 (patch) | |
tree | a8ce324f17f819eb62fe93199664886b769d9c5f /tests/unit_node/process_test.ts | |
parent | 04c6785faecdef37b3d4eefb61c0a18ff1cbdec0 (diff) |
fix(ext/node): implement process.kill in Rust (#23130)
Closes https://github.com/denoland/deno/issues/23056
Diffstat (limited to 'tests/unit_node/process_test.ts')
-rw-r--r-- | tests/unit_node/process_test.ts | 12 |
1 files changed, 12 insertions, 0 deletions
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", |