diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/subdir/worker_types.ts | 4 | ||||
-rw-r--r-- | cli/tests/unit/unit_tests.ts | 1 | ||||
-rw-r--r-- | cli/tests/unit/worker_types.ts | 14 |
3 files changed, 19 insertions, 0 deletions
diff --git a/cli/tests/subdir/worker_types.ts b/cli/tests/subdir/worker_types.ts new file mode 100644 index 000000000..7a651e35a --- /dev/null +++ b/cli/tests/subdir/worker_types.ts @@ -0,0 +1,4 @@ +// eslint-disable-next-line require-await +self.onmessage = async (_msg: MessageEvent) => { + self.postMessage("hello"); +}; diff --git a/cli/tests/unit/unit_tests.ts b/cli/tests/unit/unit_tests.ts index e97c485a8..f545e55fa 100644 --- a/cli/tests/unit/unit_tests.ts +++ b/cli/tests/unit/unit_tests.ts @@ -74,6 +74,7 @@ import "./umask_test.ts"; import "./url_test.ts"; import "./url_search_params_test.ts"; import "./utime_test.ts"; +import "./worker_types.ts"; import "./write_file_test.ts"; import "./write_text_file_test.ts"; import "./performance_test.ts"; diff --git a/cli/tests/unit/worker_types.ts b/cli/tests/unit/worker_types.ts new file mode 100644 index 000000000..e8bc7eb78 --- /dev/null +++ b/cli/tests/unit/worker_types.ts @@ -0,0 +1,14 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { assert, unitTest } from "./test_util.ts"; + +unitTest( + { perms: { read: true } }, + function utimeSyncFileSuccess() { + const w = new Worker( + new URL("../subdir/worker_types.ts", import.meta.url).href, + { type: "module" }, + ); + assert(w); + w.terminate(); + }, +); |