Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make interactive snapshot output a bit more obvious #2000

Merged
merged 7 commits into from
Nov 4, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Fix width computation
hadley committed Nov 4, 2024
commit 10106910eb8de76dbb462ca8f77f8263881d0248
4 changes: 3 additions & 1 deletion R/reporter-progress.R
Original file line number Diff line number Diff line change
@@ -534,7 +534,9 @@ issue_header <- function(x, pad = FALSE) {
issue_summary <- function(x, rule = FALSE) {
header <- cli::style_bold(issue_header(x))
if (rule) {
header <- cli::rule(header)
# Don't truncate long test names
width <- max(cli::ansi_nchar(header) + 6, getOption("width"))
header <- cli::rule(header, width = width)
}

paste0(header, "\n", format(x))

Unchanged files with check annotations Beta

snapshotter <- get_snapshotter()
if (is.null(snapshotter)) {
snapshot_not_available(path)

Check warning on line 104 in R/snapshot-file.R

Codecov / codecov/patch

R/snapshot-file.R#L104

Added line #L104 was not covered by tests
return(invisible())
}
test = title,
code = parse(ex_path, encoding = "UTF-8"),
env = env,
reporter = get_reporter() %||% StopReporter$new(),

Check warning on line 68 in R/test-example.R

Codecov / codecov/patch

R/test-example.R#L68

Added line #L68 was not covered by tests
skip_on_empty = FALSE
)
if (ok) succeed(path)