diff --git a/R/test.R b/R/test.R index 0bbe0fcc9..7a38fd8c8 100644 --- a/R/test.R +++ b/R/test.R @@ -119,9 +119,9 @@ test_coverage_file <- function(file = find_active_file(), ...) { #' @rdname test #' @export test_coverage_active_file <- function(file = find_active_file(), - filter = TRUE, - show_report = interactive(), - export_all = TRUE, + filter = TRUE, + show_report = interactive(), + export_all = TRUE, ...) { rlang::check_installed(c("covr", "DT")) check_dots_used(action = getOption("devtools.ellipsis_action", rlang::warn)) @@ -138,11 +138,13 @@ test_coverage_active_file <- function(file = find_active_file(), # To correctly simulate test_file() we need to set up both a temporary # snapshotter (with correct directory specification) for snapshot comparisons # and a stop reporter to inform the user about test failures - snap_reporter <- testthat::local_snapshotter(file.path(test_dir, "_snaps")) + snap_reporter <- testthat::local_snapshotter( + snap_dir = file.path(test_dir, "_snaps") + ) snap_reporter$start_file(basename(test_file)) reporter <- testthat::MultiReporter$new(reporters = list( - testthat::StopReporter$new(praise = FALSE), - snap_reporter + testthat::StopReporter$new(praise = FALSE), + snap_reporter )) withr::local_envvar(r_env_vars())