tests/testthat/helper-aaa.R

teardown_env <- function() {
  if (testthat::is_testing())
    testthat::teardown_env()
  else
    globalenv()
}

the$tests_repopath <- renv_scope_tempfile("renv-repos-", scope = teardown_env())
renv_tests_repopath <- function() {
  the$tests_repopath
}
rstudio/renv documentation built on July 8, 2024, 5:48 a.m.