summaryrefslogtreecommitdiff
path: root/tests/testdata/run/error_cause_recursive.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata/run/error_cause_recursive.ts')
-rw-r--r--tests/testdata/run/error_cause_recursive.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/testdata/run/error_cause_recursive.ts b/tests/testdata/run/error_cause_recursive.ts
new file mode 100644
index 000000000..a6999b1ff
--- /dev/null
+++ b/tests/testdata/run/error_cause_recursive.ts
@@ -0,0 +1,4 @@
+const x = new Error("foo");
+const y = new Error("bar", { cause: x });
+x.cause = y;
+throw y;