From a87be28a46b67e53354f8ce69386057ddbb0f46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 16 Apr 2022 16:12:26 +0200 Subject: feat: Better formatting for AggregateError (#14285) This commit adds "aggregated" field to "deno_core::JsError" that stores instances of "JsError" recursively to properly handle "AggregateError" formatting. Appropriate logics was added to "PrettyJsError" and "console" API to format AggregateErrors. Co-authored-by: Nayeem Rahman --- cli/tests/integration/run_tests.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cli/tests/integration/run_tests.rs') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 969a57a9f..b918e403d 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2714,3 +2714,15 @@ itest!(set_timeout_error_handled { args: "run --quiet set_timeout_error_handled.ts", output: "set_timeout_error_handled.ts.out", }); + +itest!(aggregate_error { + args: "run --quiet aggregate_error.ts", + output: "aggregate_error.out", + exit_code: 1, +}); + +itest!(complex_error { + args: "run --quiet complex_error.ts", + output: "complex_error.ts.out", + exit_code: 1, +}); -- cgit v1.2.3