diff options
Diffstat (limited to 'tests/specs/test/worker_large_output/main.js')
-rw-r--r-- | tests/specs/test/worker_large_output/main.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/specs/test/worker_large_output/main.js b/tests/specs/test/worker_large_output/main.js new file mode 100644 index 000000000..0941e60f3 --- /dev/null +++ b/tests/specs/test/worker_large_output/main.js @@ -0,0 +1,15 @@ +// Regression test for workers that post large amounts of output as a test is ending. This +// test should not deadlock, though the output is undefined. +Deno.test(async function workerOutput() { + console.log("Booting worker"); + const code = + "self.postMessage(0); console.log(`hello from worker\n`.repeat(60000));"; + const worker = new Worker(URL.createObjectURL(new Blob([code])), { + type: "module", + }); + await new Promise((r) => + worker.addEventListener("message", () => { + r(); + }) + ); +}); |