summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/workers/error_event.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/workers/error_event.ts')
-rw-r--r--cli/tests/testdata/workers/error_event.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/testdata/workers/error_event.ts b/cli/tests/testdata/workers/error_event.ts
new file mode 100644
index 000000000..f3046178a
--- /dev/null
+++ b/cli/tests/testdata/workers/error_event.ts
@@ -0,0 +1,11 @@
+const worker = new Worker(new URL("error.ts", import.meta.url).href, {
+ type: "module",
+});
+worker.addEventListener("error", (e) => {
+ console.log({
+ "message": e.message,
+ "filename": e.filename?.slice?.(-100),
+ "lineno": e.lineno,
+ "colno": e.colno,
+ });
+});