summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/error_cause_recursive.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/error_cause_recursive.ts')
-rw-r--r--cli/tests/testdata/error_cause_recursive.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/tests/testdata/error_cause_recursive.ts b/cli/tests/testdata/error_cause_recursive.ts
new file mode 100644
index 000000000..a6999b1ff
--- /dev/null
+++ b/cli/tests/testdata/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;