diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2019-08-06 06:22:11 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-08-06 09:22:11 -0400 |
commit | ccee2f01ba2f6304720ab17e99dee17bf6687bd8 (patch) | |
tree | df04bd385c05e13b6a835fc4955cd5eac2c7c582 /tests | |
parent | 11c850af423f07769f054c494a76cbd9efb8806c (diff) |
Implement Blob url support for worker (#2729)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/040_worker_blob.test | 2 | ||||
-rw-r--r-- | tests/040_worker_blob.ts | 6 | ||||
-rw-r--r-- | tests/040_worker_blob.ts.out | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/tests/040_worker_blob.test b/tests/040_worker_blob.test new file mode 100644 index 000000000..81fd3182e --- /dev/null +++ b/tests/040_worker_blob.test @@ -0,0 +1,2 @@ +args: run --reload tests/040_worker_blob.ts +output: tests/040_worker_blob.ts.out diff --git a/tests/040_worker_blob.ts b/tests/040_worker_blob.ts new file mode 100644 index 000000000..1ba4528cf --- /dev/null +++ b/tests/040_worker_blob.ts @@ -0,0 +1,6 @@ +const b = new Blob(["console.log('code from Blob'); postMessage('DONE')"]); +const blobURL = URL.createObjectURL(b); +const worker = new Worker(blobURL); +worker.onmessage = (): void => { + Deno.exit(0); +}; diff --git a/tests/040_worker_blob.ts.out b/tests/040_worker_blob.ts.out new file mode 100644 index 000000000..f49b8f3d6 --- /dev/null +++ b/tests/040_worker_blob.ts.out @@ -0,0 +1 @@ +code from Blob |