From 19bcb40059f6ba730b6d05d8edf005c6b40f6ff8 Mon Sep 17 00:00:00 2001 From: Hajime-san <41257923+Hajime-san@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:27:36 +0900 Subject: feat(cli/tools): add a subcommand `--hide-stacktraces` for test (#24095) --- cli/tools/bench/reporters.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cli/tools/bench/reporters.rs') diff --git a/cli/tools/bench/reporters.rs b/cli/tools/bench/reporters.rs index 9a1da04ec..3f244ed62 100644 --- a/cli/tools/bench/reporters.rs +++ b/cli/tools/bench/reporters.rs @@ -2,6 +2,7 @@ use serde::Serialize; +use crate::tools::test::TestFailureFormatOptions; use crate::version; use super::*; @@ -243,7 +244,10 @@ impl BenchReporter for ConsoleReporter { &desc.name, &mitata::reporter::Error { stack: None, - message: format_test_error(js_error), + message: format_test_error( + js_error, + &TestFailureFormatOptions::default() + ), }, options ) @@ -298,7 +302,7 @@ impl BenchReporter for ConsoleReporter { println!( "{}: {}", colors::red_bold("error"), - format_test_error(&error) + format_test_error(&error, &TestFailureFormatOptions::default()) ); println!("This error was not caught from a benchmark and caused the bench runner to fail on the referenced module."); println!("It most likely originated from a dangling promise, event/timeout handler or top-level code."); -- cgit v1.2.3