Skip to content

Commit

Permalink
internal: tweak color of showing test result (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash authored Sep 6, 2024
1 parent 95c6fb2 commit 69e9a62
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions crates/moon/src/cli/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,21 @@ fn do_run_test(
let failed = total - passed;
println!(
"Total tests: {}, passed: {}, failed: {}.",
total.to_string().blue(),
passed.to_string().green(),
failed.to_string().red()
if total > 0 {
total.to_string().blue().to_string()
} else {
total.to_string()
},
if passed > 0 {
passed.to_string().green().to_string()
} else {
passed.to_string()
},
if failed > 0 {
failed.to_string().red().to_string()
} else {
failed.to_string()
}
);

if passed == total {
Expand Down

0 comments on commit 69e9a62

Please sign in to comment.