diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R new file mode 100644 index 0000000..57b49e6 --- /dev/null +++ b/tests/testthat/setup.R @@ -0,0 +1,9 @@ +cleanup <- function() { + cachedir <- tools::R_user_dir("snvecR", which = "cache") + if (dir.exists(cachedir)) { + cli::cli_inform("Removing {.file {cachedir}} from reproducible environment.") + unlink(cachedir, recursive = TRUE) + } +} + +withr::defer(cleanup(), teardown_env())