test_patched_dir.RdRun testthat tests against a patched package namespace
test_patched_dir(pkg, test_path = "tests/testthat", reporter = "summary")Result object from testthat::test_dir.
if (FALSE) { # \dontrun{
# Inject a patch to the package
inject_patch(
pkg = "hotpatchR",
patch_list = list(dummy_child_func = function(x) {
paste("PATCHED! Input:", x)
})
)
# Run tests against the patched package
test_patched_dir(pkg = "hotpatchR")
} # }