diff options
Diffstat (limited to 'tests/unit_node/process_test.ts')
-rw-r--r-- | tests/unit_node/process_test.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts index a28e1e5cd..f496290d9 100644 --- a/tests/unit_node/process_test.ts +++ b/tests/unit_node/process_test.ts @@ -237,7 +237,7 @@ Deno.test({ Deno.test({ name: "process.off signal", - ignore: true, // This test fails to terminate + ignore: Deno.build.os == "windows", async fn() { const testTimeout = setTimeout(() => fail("Test timed out"), 10_000); try { @@ -246,13 +246,13 @@ Deno.test({ "eval", ` import process from "node:process"; - console.log("ready"); setInterval(() => {}, 1000); const listener = () => { + process.off("SIGINT", listener); console.log("foo"); - process.off("SIGINT", listener) }; process.on("SIGINT", listener); + console.log("ready"); `, ], stdout: "piped", @@ -275,6 +275,7 @@ Deno.test({ while (!output.includes("foo\n")) { await delay(10); } + process.kill("SIGINT"); await process.status; } finally { clearTimeout(testTimeout); |