diff --git a/crates/forge/src/result.rs b/crates/forge/src/result.rs index b88f7dbbb4a48..cb5d3ac12f84c 100644 --- a/crates/forge/src/result.rs +++ b/crates/forge/src/result.rs @@ -192,6 +192,15 @@ impl TestOutcome { successes.to_string().green() )?; + // Show helpful hint for rerunning failed tests + let test_word = if failures == 1 { "test" } else { "tests" }; + sh_println!( + "\n💡 Tip: Run {} to retry only the {} failed {}", + "`forge test --rerun`".cyan(), + failures, + test_word + )?; + // TODO: Avoid process::exit std::process::exit(1); }