diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration_tests.rs | 5 | ||||
-rw-r--r-- | cli/tests/subdir/worker_unstable.ts | 5 | ||||
-rw-r--r-- | cli/tests/unstable_worker.ts | 10 | ||||
-rw-r--r-- | cli/tests/unstable_worker.ts.out | 2 |
4 files changed, 22 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 9c6c4eef2..6aa2c8a9d 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -2792,6 +2792,11 @@ itest!(unstable_disabled_ts2551 { output: "unstable_disabled_ts2551.out", }); +itest!(unstable_worker { + args: "run --reload --unstable --quiet --allow-read unstable_worker.ts", + output: "unstable_worker.ts.out", +}); + itest!(_053_import_compression { args: "run --quiet --reload --allow-net 053_import_compression/main.ts", output: "053_import_compression.out", diff --git a/cli/tests/subdir/worker_unstable.ts b/cli/tests/subdir/worker_unstable.ts new file mode 100644 index 000000000..3a1ed8b74 --- /dev/null +++ b/cli/tests/subdir/worker_unstable.ts @@ -0,0 +1,5 @@ +console.log(Deno.permissions.query); +console.log(Deno.compile); +self.onmessage = () => { + self.close(); +}; diff --git a/cli/tests/unstable_worker.ts b/cli/tests/unstable_worker.ts new file mode 100644 index 000000000..6b5304edf --- /dev/null +++ b/cli/tests/unstable_worker.ts @@ -0,0 +1,10 @@ +const w = new Worker( + new URL("subdir/worker_unstable.ts", import.meta.url).href, + { + type: "module", + deno: true, + name: "Unstable Worker", + }, +); + +w.postMessage({}); diff --git a/cli/tests/unstable_worker.ts.out b/cli/tests/unstable_worker.ts.out new file mode 100644 index 000000000..cdbb7e911 --- /dev/null +++ b/cli/tests/unstable_worker.ts.out @@ -0,0 +1,2 @@ +[Function: query] +[AsyncFunction: compile] |