summaryrefslogtreecommitdiff
path: root/tests/unit_node/testdata/child_process_unref.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit_node/testdata/child_process_unref.js')
-rw-r--r--tests/unit_node/testdata/child_process_unref.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/unit_node/testdata/child_process_unref.js b/tests/unit_node/testdata/child_process_unref.js
new file mode 100644
index 000000000..8201ac44d
--- /dev/null
+++ b/tests/unit_node/testdata/child_process_unref.js
@@ -0,0 +1,10 @@
+import cp from "node:child_process";
+import * as path from "node:path";
+import { fileURLToPath } from "node:url";
+
+const script = path.join(
+ path.dirname(fileURLToPath(import.meta.url)),
+ "infinite_loop.js",
+);
+const childProcess = cp.spawn(Deno.execPath(), ["run", script]);
+childProcess.unref();