diff --git a/tests/testthat/helper.R b/tests/testthat/helper.R new file mode 100644 index 0000000..ab4769e --- /dev/null +++ b/tests/testthat/helper.R @@ -0,0 +1,10 @@ +test_path <- function(...) { + # testthat::test_path() returns incorrect value + # when in the context of devtools::test_coverage_active_file() + path <- file.path(...) + if (file.exists(path)) { + path + } else { + file.path("tests/testthat/", path) + } +}