Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions R/reporter-check.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ CheckReporter <- R6::R6Class("CheckReporter",
},

end_reporter = function() {
self$cat_line(summary_line(
n_fail = self$problems$size(),
n_warn = self$warnings$size(),
n_skip = self$skips$size(),
n_pass = self$n_ok
))
self$cat_line()

if (self$skips$size() > 0) {
self$rule("Skipped tests", line = 2)
self$cat_line(skip_bullets(self$skips$as_list()))
Expand Down
8 changes: 8 additions & 0 deletions tests/testthat/_snaps/reporter-check.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# basic report works

[ FAIL 4 | WARN 1 | SKIP 3 | PASS 1 ]

== Skipped tests ===============================================================
* empty test (2)
* skip (1)
Expand Down Expand Up @@ -39,6 +41,8 @@

# doesn't truncate long lines

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]

== Failed tests ================================================================
-- Failure (long-test.R:2:3): That very long test messages are not truncated because they contain useful information that you probably want to read --
Failure has been forced
Expand All @@ -48,9 +52,13 @@
# always shows summary

[ FAIL 0 | WARN 0 | SKIP 0 | PASS 7 ]

[ FAIL 0 | WARN 0 | SKIP 0 | PASS 7 ]

# shows warnings when not on CRAN

[ FAIL 4 | WARN 1 | SKIP 3 | PASS 1 ]

== Skipped tests ===============================================================
* empty test (2)
* skip (1)
Expand Down