summaryrefslogtreecommitdiff
path: root/cli/tests/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r--cli/tests/testdata/run/error_with_errors_prop.js10
-rw-r--r--cli/tests/testdata/run/error_with_errors_prop.js.out10
2 files changed, 20 insertions, 0 deletions
diff --git a/cli/tests/testdata/run/error_with_errors_prop.js b/cli/tests/testdata/run/error_with_errors_prop.js
new file mode 100644
index 000000000..d1c6bbfaa
--- /dev/null
+++ b/cli/tests/testdata/run/error_with_errors_prop.js
@@ -0,0 +1,10 @@
+const error = new Error("Error with errors prop.");
+error.errors = [
+ new Error("Error message 1."),
+ new Error("Error message 2."),
+];
+console.log(error.stack);
+console.log();
+console.log(error);
+console.log();
+throw error;
diff --git a/cli/tests/testdata/run/error_with_errors_prop.js.out b/cli/tests/testdata/run/error_with_errors_prop.js.out
new file mode 100644
index 000000000..3154e86e6
--- /dev/null
+++ b/cli/tests/testdata/run/error_with_errors_prop.js.out
@@ -0,0 +1,10 @@
+Error: Error with errors prop.
+ at [WILDCARD]/error_with_errors_prop.js:1:15
+
+Error: Error with errors prop.
+ at [WILDCARD]/error_with_errors_prop.js:1:15
+
+error: Uncaught Error: Error with errors prop.
+const error = new Error("Error with errors prop.");
+ ^
+ at [WILDCARD]/error_with_errors_prop.js:1:15