Skip to content

Commit

Permalink
Try another technique
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Nov 22, 2023
1 parent a8180da commit 39a6567
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/testthat/helper.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

# Ensure that tests use their own cache directory
getNamespace("R.cache")$setCachePath(c("styler", styler:::styler_version), tempdir())
# Work around R.cache bug on CI
dir.create(
tools::R_user_dir("R.cache", which = "cache"),
recursive = TRUE,
showWarnings = FALSE
)
# getNamespace("R.cache")$setCachePath(c("styler", styler:::styler_version), tempdir())

expect_error_free <- function(...) {
expect_error(..., regexp = NA)
Expand Down

0 comments on commit 39a6567

Please sign in to comment.