diff options
Diffstat (limited to 'cli/tests/workers/test.ts')
-rw-r--r-- | cli/tests/workers/test.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/tests/workers/test.ts b/cli/tests/workers/test.ts index 72b87e398..c3ccebfbb 100644 --- a/cli/tests/workers/test.ts +++ b/cli/tests/workers/test.ts @@ -701,6 +701,7 @@ Deno.test({ Deno.test({ name: "Worker with native HTTP", fn: async function () { + const result = deferred(); const worker = new Worker( new URL( "./http_worker.js", @@ -714,6 +715,10 @@ Deno.test({ }, }, ); + worker.onmessage = () => { + result.resolve(); + }; + await result; assert(worker); const response = await fetch("http://localhost:4500"); |