Skip to content

Commit ec4bfe3

Browse files
committed
Tweak wording/framing
1 parent 5245866 commit ec4bfe3

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

R/reporter-check.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ CheckReporter <- R6::R6Class(
7474
self$cat_line()
7575

7676
if (some(problems, \(x) isTRUE(attr(x, "snapshot")))) {
77-
self$rule("To resolve snapshot failures", line = 1)
77+
self$rule("Snapshots", line = 1)
7878
self$cat_line(snapshot_check_hint())
7979
}
8080
} else {
@@ -120,6 +120,8 @@ summary_line <- function(n_fail, n_warn, n_skip, n_pass) {
120120
}
121121

122122
snapshot_check_hint <- function() {
123+
intro <- "To review and process snapshots locally:"
124+
123125
if (on_gh()) {
124126
repository <- Sys.getenv("GITHUB_REPOSITORY")
125127
run_id <- Sys.getenv("GITHUB_RUN_ID")
@@ -145,7 +147,7 @@ snapshot_check_hint <- function() {
145147
"* Run `testthat::snapshot_accept()` to accept all changes.",
146148
"* Run `testthat::snapshot_review()` to review all changes."
147149
)
148-
c(copy, action)
150+
c(intro, copy, action)
149151
}
150152

151153
run <- function(x) {

tests/testthat/_snaps/reporter-check.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
Code
102102
base::writeLines(snapshot_check_hint())
103103
Output
104+
To review and process snapshots locally:
104105
* Locate check directory.
105106
* Copy 'tests/testthat/_snaps' to local package.
106107
* Run `testthat::snapshot_accept()` to accept all changes.
@@ -111,6 +112,7 @@
111112
Code
112113
base::writeLines(snapshot_check_hint())
113114
Output
115+
To review and process snapshots locally:
114116
* Download and unzip artifact.
115117
* Copy 'tests/testthat/_snaps' to local package.
116118
* Run `testthat::snapshot_accept()` to accept all changes.
@@ -121,6 +123,7 @@
121123
Code
122124
base::writeLines(snapshot_check_hint())
123125
Output
126+
To review and process snapshots locally:
124127
* Run `testthat::snapshot_download_gh("r-lib/testthat", "123")` to download snapshots.
125128
* Run `testthat::snapshot_accept()` to accept all changes.
126129
* Run `testthat::snapshot_review()` to review all changes.

0 commit comments

Comments
 (0)