| test_package {testthat} | R Documentation |
Test are run in an environment that inherits from the package's namespace
environment, so that tests can access non-exported functions and variables.
Tests should be placed in either inst/tests, or (better)
tests/testthat.
test_package(package, filter = NULL, reporter = "summary") test_check(package, filter = NULL, reporter = "summary")
package |
package name |
filter |
If not |
reporter |
reporter to use |
a data frame of the summary of test results
Use test_package to test an installed package, or in
tests/test-all.Rif you're using the older inst/tests
convention.
If your tests live in tests/testthat (preferred) use test_check
in tests/testthat.R. You still use test_package when testing
the installed package.
## Not run: test_package("testthat")