test_package {tinytest} | R Documentation |
Run all tests in a package. Throw an error and print all failed test
results when one or more tests fail. This function is intended to be
used with R CMD check
and not for interactive use (use test_all
or build_install_test
instead). Tests that are only run
at_home
are skipped by default (as if it was run on CRAN).
test_package(pkgname, testdir = "tinytest", at_home = FALSE, ...)
pkgname |
|
testdir |
|
at_home |
|
... |
extra arguments, passed to |
We set at_home=FALSE
by default so R CMD check
will run the same
as at CRAN.
Other test-files: build_install_test
,
run_test_dir
, run_test_file
,
summary.tinytests
## Not run: # Create a file with the following content, to use # tinytest as your unit testing framework: if (requireNamespace("tinytest", quietly=TRUE)) test_package("your package name") ## End(Not run)