View source: R/run_covr_modes.R
| load_test_helpers | R Documentation |
This function searches for all files in the 'tests/testthat' directory that match the pattern 'helper-*.R' and sources them into the provided environment. This is useful when running coverage with 'covr::environment_coverage()' to ensure helper functions are available during test execution.
load_test_helpers(env, helper_dir = "tests/testthat")
env |
An environment into which the helper files should be sourced. Typically this is the same environment used for coverage, e.g., 'cov_env'. |
helper_dir |
Path to the directory containing helper files. Defaults to '"tests/testthat"'. |
Invisibly returns 'TRUE' if all files are sourced successfully.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.