Skip to content

Commit eed24f0

Browse files
committed
Pluralise message
1 parent 31f92e7 commit eed24f0

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

R/reporter-stop.R

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,9 @@ StopReporter <- R6::R6Class(
5656

5757
if (self$praise && self$n_fail == 0 && self$n_success > 0) {
5858
emoji <- praise_emoji()
59-
self$cat_line(
60-
"Test ",
61-
colourise("passed", "success"),
62-
" with ",
63-
self$n_success,
64-
" successes ",
65-
emoji
66-
)
59+
self$cat_line(cli::format_inline(
60+
"Test passed with {self$n_success} success{?es} {emoji}."
61+
))
6762
}
6863

6964
if (self$n_fail > 0) {

tests/testthat/_snaps/reporter-stop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# produces useful output
22

3-
Test passed with 1 successes
3+
Test passed with 1 success .
44
-- Failure ('reporters/tests.R:13:3'): Failure:1 -------------------------------
55
Expected `x` to be TRUE.
66
Differences:

0 commit comments

Comments
 (0)