Run this function from the package root. It enables long tests in
.BBSoptions and creates longtests/testthat and a testthat runner.
An existing long test runner is preserved. If there is no long test runner,
the function copies tests/testthat.R when available or creates a runner
for the package named in DESCRIPTION.
Examples
pkg <- tempfile("longtests-example-")
dir.create(pkg)
old <- setwd(pkg)
tryCatch({
writeLines("Package: examplepkg", "DESCRIPTION")
use_longtests()
}, finally = {
setwd(old)
unlink(pkg, recursive = TRUE, expand = FALSE)
})
#> ✔ Created longtests/testthat.R.
#> ✔ Enabled long tests in .BBSoptions.
