summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/workers/close_nested_child.js
diff options
context:
space:
mode:
authorAndreu Botella <abb@randomunok.com>2021-09-25 04:26:57 +0200
committerGitHub <noreply@github.com>2021-09-24 19:26:57 -0700
commit1a6249c9717288e37873b692abac831f11c30f4e (patch)
treee8962a090909ac3187237319732ffb41b8a61a38 /cli/tests/testdata/workers/close_nested_child.js
parent4e2b59f9df5085025f08faea24e76b009e47f68d (diff)
chore(workers): Test that closing a worker closes any child workers (#12215)
Before #12156, closing a worker which had children would cause a panic (https://github.com/denoland/deno/issues/11342#issuecomment-918327693). After that PR, closing a worker will also close any child workers.
Diffstat (limited to 'cli/tests/testdata/workers/close_nested_child.js')
-rw-r--r--cli/tests/testdata/workers/close_nested_child.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/tests/testdata/workers/close_nested_child.js b/cli/tests/testdata/workers/close_nested_child.js
new file mode 100644
index 000000000..627a176aa
--- /dev/null
+++ b/cli/tests/testdata/workers/close_nested_child.js
@@ -0,0 +1,7 @@
+// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+
+console.log("Starting the child worker");
+
+setTimeout(() => {
+ console.log("The child worker survived the death of the parent!!!");
+}, 2000);