test_that tests in a package.
Tests are assumed to be located in either the
tests/testthat directory (the latter is recommended).
test_dir for the naming convention of test
scripts within one of those directories and
test_check for the folder structure conventions.
test(pkg = ".", filter = NULL, ...)
uses_testthat(pkg = ".")
- package description, can be path or package name. See
as.packagefor more information
- If not
NULL, only tests with file names matching this regular expression will be executed. Matching will take on the file name after it has been stripped of
- additional arguments passed to
If no testing infrastructure is present
(detected by the
uses_testthat function), you'll be asked if you want
devtools to create it for you (in interactive sessions only). See
use_test for more details.