diff options
Diffstat (limited to 'cli/tests/workers_test.ts')
-rw-r--r-- | cli/tests/workers_test.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cli/tests/workers_test.ts b/cli/tests/workers_test.ts index c4b93db3c..df2cdf2aa 100644 --- a/cli/tests/workers_test.ts +++ b/cli/tests/workers_test.ts @@ -290,3 +290,20 @@ Deno.test({ await promise2; }, }); + +Deno.test({ + name: "worker with crypto in scope", + fn: async function (): Promise<void> { + const promise = createResolvable(); + const w = new Worker("../tests/subdir/worker_crypto.js", { + type: "module", + }); + w.onmessage = (e): void => { + assertEquals(e.data, true); + promise.resolve(); + }; + w.postMessage(null); + await promise; + w.terminate(); + }, +}); |