summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/error_cause.ts
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2021-12-29 19:34:13 +0100
committerGitHub <noreply@github.com>2021-12-29 19:34:13 +0100
commit167982be9e7af35e6c12ef6c40c002200bf5e0c0 (patch)
treeb064a4db5beca73e0235e9fc7b15fc624f3b13ab /cli/tests/testdata/error_cause.ts
parent42777f25416ca292c56587e6cc4dfe9f50bebd81 (diff)
feat: output `cause` on JS runtime errors (#13209)
Diffstat (limited to 'cli/tests/testdata/error_cause.ts')
-rw-r--r--cli/tests/testdata/error_cause.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/tests/testdata/error_cause.ts b/cli/tests/testdata/error_cause.ts
new file mode 100644
index 000000000..7ebd5a48a
--- /dev/null
+++ b/cli/tests/testdata/error_cause.ts
@@ -0,0 +1,13 @@
+function a() {
+ throw new Error("foo", { cause: new Error("bar", { cause: "deno" }) });
+}
+
+function b() {
+ a();
+}
+
+function c() {
+ b();
+}
+
+c();