diff options
Diffstat (limited to 'tests/specs/run/unstable_worker')
4 files changed, 17 insertions, 0 deletions
diff --git a/tests/specs/run/unstable_worker/__test__.jsonc b/tests/specs/run/unstable_worker/__test__.jsonc new file mode 100644 index 000000000..7a6e9bfbe --- /dev/null +++ b/tests/specs/run/unstable_worker/__test__.jsonc @@ -0,0 +1,4 @@ +{ + "args": "run --reload --quiet --allow-read unstable_worker.ts", + "output": "unstable_worker.ts.out" +} diff --git a/tests/specs/run/unstable_worker/unstable_worker.ts b/tests/specs/run/unstable_worker/unstable_worker.ts new file mode 100644 index 000000000..b0554c5b2 --- /dev/null +++ b/tests/specs/run/unstable_worker/unstable_worker.ts @@ -0,0 +1,6 @@ +const w = new Worker( + import.meta.resolve("./worker_unstable.ts"), + { type: "module", name: "Unstable Worker" }, +); + +w.postMessage({}); diff --git a/tests/specs/run/unstable_worker/unstable_worker.ts.out b/tests/specs/run/unstable_worker/unstable_worker.ts.out new file mode 100644 index 000000000..182dc58a4 --- /dev/null +++ b/tests/specs/run/unstable_worker/unstable_worker.ts.out @@ -0,0 +1,2 @@ +[Function: query] +[Function: consoleSize] diff --git a/tests/specs/run/unstable_worker/worker_unstable.ts b/tests/specs/run/unstable_worker/worker_unstable.ts new file mode 100644 index 000000000..219f34e7b --- /dev/null +++ b/tests/specs/run/unstable_worker/worker_unstable.ts @@ -0,0 +1,5 @@ +console.log(Deno.permissions.query); +console.log(Deno.consoleSize); +self.onmessage = () => { + self.close(); +}; |