Skip to content

Commit

Permalink
fix(test): change inflection depending on number of pending tests (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
caspervonb authored May 2, 2021
1 parent 8905752 commit 40961cd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/tests/test/deno_test_only.ts.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[WILDCARD]
running 1 tests from [WILDCARD]
running 1 test from [WILDCARD]
test def ... ok ([WILDCARD])

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out ([WILDCARD])
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/test/quiet_test.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
running 1 tests from [WILDCARD]
running 1 test from [WILDCARD]
test log ... ok [WILDCARD]

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD]
7 changes: 6 additions & 1 deletion cli/tools/test_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ impl TestReporter for PrettyTestReporter {
filtered,
only: _,
} => {
println!("running {} tests from {}", pending, event.origin);
if *pending == 1 {
println!("running {} test from {}", pending, event.origin);
} else {
println!("running {} tests from {}", pending, event.origin);
}

self.pending += pending;
self.filtered_out += filtered;
}
Expand Down

0 comments on commit 40961cd

Please sign in to comment.