diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/error_worker_dynamic.ts | 3 | ||||
-rw-r--r-- | cli/tests/error_worker_dynamic.ts.out | 3 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 7 |
3 files changed, 13 insertions, 0 deletions
diff --git a/cli/tests/error_worker_dynamic.ts b/cli/tests/error_worker_dynamic.ts new file mode 100644 index 000000000..16fadf573 --- /dev/null +++ b/cli/tests/error_worker_dynamic.ts @@ -0,0 +1,3 @@ +const b = new Blob(['throw new Error("hello");']); +const blobURL = URL.createObjectURL(b); +new Worker(blobURL); diff --git a/cli/tests/error_worker_dynamic.ts.out b/cli/tests/error_worker_dynamic.ts.out new file mode 100644 index 000000000..4bea7b656 --- /dev/null +++ b/cli/tests/error_worker_dynamic.ts.out @@ -0,0 +1,3 @@ +[WILDCARD]error: Uncaught Error: hello +[WILDCARD]__anonymous__:1:7 + at [WILDCARD]__anonymous__:1:7 diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 4bb7fbe6e..99ab54a02 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -474,6 +474,13 @@ itest!(error_type_definitions { output: "error_type_definitions.ts.out", }); +itest!(error_worker_dynamic { + args: "run --reload error_worker_dynamic.ts", + check_stderr: true, + exit_code: 1, + output: "error_worker_dynamic.ts.out", +}); + itest!(exit_error42 { exit_code: 42, args: "run --reload exit_error42.ts", |