Skip to content

Commit 52dbac9

Browse files
committed
Set NOT_CRAN before collecting mock package tests
1 parent 2930cbd commit 52dbac9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/testthat/setup-mock.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ subset_results <- function(results, file, test) {
1010
mock_pkg_dir <- create_mock_pkg()
1111
mock_test_dir <- file.path(mock_pkg_dir, "tests", "testthat")
1212

13-
log_var <- c(VDIFFR_LOG_PATH = file.path(mock_pkg_dir, "tests", "vdiffr.Rout.fail"))
14-
withr::with_envvar(log_var, {
13+
vars <- c(
14+
VDIFFR_LOG_PATH = file.path(mock_pkg_dir, "tests", "vdiffr.Rout.fail"),
15+
NOT_CRAN = "true"
16+
)
17+
withr::with_envvar(vars, {
1518
test_results <- testthat::test_dir(mock_test_dir, reporter = "silent")
1619
})
1720

0 commit comments

Comments
 (0)