diff options
| author | Mohammad Sulaiman <mohammad.sulaiman@exalt.ps> | 2024-09-09 18:07:41 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-09 11:07:41 -0400 |
| commit | 582be0adc2b80e532cf92ffbc44c8c8268a51774 (patch) | |
| tree | 48e5cdb63e524f974b17a3b787559ab0ff42e5c5 /tests/specs/worker/nonexistent_worker | |
| parent | 5126ccb8428c4ccf199d3b30f1cd86ef11009ef7 (diff) | |
chore: Deprecate worker itests (#25514)
Diffstat (limited to 'tests/specs/worker/nonexistent_worker')
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/specs/worker/nonexistent_worker/__test__.jsonc b/tests/specs/worker/nonexistent_worker/__test__.jsonc new file mode 100644 index 000000000..eada83352 --- /dev/null +++ b/tests/specs/worker/nonexistent_worker/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "run --allow-read nonexistent_worker.ts", + "output": "nonexistent_worker.out", + "exitCode": 1 +} diff --git a/tests/specs/worker/nonexistent_worker/nonexistent_worker.out b/tests/specs/worker/nonexistent_worker/nonexistent_worker.out new file mode 100644 index 000000000..977d2af48 --- /dev/null +++ b/tests/specs/worker/nonexistent_worker/nonexistent_worker.out @@ -0,0 +1,3 @@ +[WILDCARD]error: Uncaught (in worker "") Module not found "file:///[WILDCARD]/doesnt_exist.js". +error: Uncaught (in promise) Error: Unhandled error in child worker. + at Worker.#pollControl[WILDCARD] diff --git a/tests/specs/worker/nonexistent_worker/nonexistent_worker.ts b/tests/specs/worker/nonexistent_worker/nonexistent_worker.ts new file mode 100644 index 000000000..b30d08636 --- /dev/null +++ b/tests/specs/worker/nonexistent_worker/nonexistent_worker.ts @@ -0,0 +1,5 @@ +const w = new Worker(import.meta.resolve("./doesnt_exist.js"), { + type: "module", +}); + +w.postMessage("hello"); |
