If I have tests/testhat/testhat.R, devtools::test() finds it and runs it, but covr:package_coverage() and R CMD check does not find it.
If I have it as tests/testhat.R, devtools::test() doesn't find it but covr:package_coverage() and R CMD check does.
What's the best way to do this?
R 4.0.0; testthat 2.3.2; covr 3.5.0
Your directory structure of the
testfolder should look like this:And
testthat.RcontainsThis works with
R CMD check,covranddevtools::check().