testthat_examples()
retrieves path to directory of test files,
testthat_example()
retrieves path to a single test file.
testthat_examples()
testthat_example(filename)
Name of test file
dir(testthat_examples())
#> [1] "_snaps" "test-failure.R" "test-success.R"
testthat_example("success")
#> [1] "/data/GHE/deployment/deployments/2022-05-19/renv/library/R-4.1/x86_64-pc-linux-gnu/testthat/examples/test-success.R"