summaryrefslogtreecommitdiff
path: root/tests/unit_node/testdata/worker_module/other_file.js
diff options
context:
space:
mode:
authormash-graz <mash-graz@users.noreply.github.com>2024-03-20 04:42:22 +0100
committerGitHub <noreply@github.com>2024-03-20 09:12:22 +0530
commit0d43a63636c97886c10c6b8ce05fdb67cd2d8b91 (patch)
treec1bde8b36ec1d317f0d85ee7f40243169a2f4e2f /tests/unit_node/testdata/worker_module/other_file.js
parentb9f8562754f14aecfd87acdecfe8d8c966ccbe4d (diff)
fix(ext/node): worker_threads ESM handling (#22841)
Fixes #22840 Fixes #22964
Diffstat (limited to 'tests/unit_node/testdata/worker_module/other_file.js')
-rw-r--r--tests/unit_node/testdata/worker_module/other_file.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/unit_node/testdata/worker_module/other_file.js b/tests/unit_node/testdata/worker_module/other_file.js
index 41789dfe8..6bb9b6b83 100644
--- a/tests/unit_node/testdata/worker_module/other_file.js
+++ b/tests/unit_node/testdata/worker_module/other_file.js
@@ -1,3 +1,8 @@
export async function myFunction() {
- await new Promise((resolve) => setTimeout(resolve, 100));
+ await new Promise((resolve) =>
+ setTimeout(() => {
+ postMessage("hallo");
+ resolve;
+ }, 100)
+ );
}