diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-04-16 23:40:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-16 23:40:29 +0200 |
| commit | d359789c529d3c7b5fab5471309eaa4b75fc0bfd (patch) | |
| tree | d9e9d45c2d65054c382a5bea1d818ea049b832bd /cli/tests/subdir | |
| parent | 1cd1f7de70b8ee68d2f6757f2b38a712ea1f3876 (diff) | |
feat: support Deno namespace in Worker API (#4784)
Diffstat (limited to 'cli/tests/subdir')
| -rw-r--r-- | cli/tests/subdir/deno_worker.ts | 7 | ||||
| -rw-r--r-- | cli/tests/subdir/non_deno_worker.js | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/cli/tests/subdir/deno_worker.ts b/cli/tests/subdir/deno_worker.ts new file mode 100644 index 000000000..6a57c47f0 --- /dev/null +++ b/cli/tests/subdir/deno_worker.ts @@ -0,0 +1,7 @@ +onmessage = function (e): void { + if (typeof self.Deno === "undefined") { + throw new Error("Deno namespace not available in worker"); + } + + postMessage(e.data); +}; diff --git a/cli/tests/subdir/non_deno_worker.js b/cli/tests/subdir/non_deno_worker.js new file mode 100644 index 000000000..773721560 --- /dev/null +++ b/cli/tests/subdir/non_deno_worker.js @@ -0,0 +1,7 @@ +onmessage = function (e) { + if (typeof self.Deno !== "undefined") { + throw new Error("Deno namespace unexpectedly available in worker"); + } + + postMessage(e.data); +}; |
