Run all of the tests in a directory.

Share:

Description

Test files start with test and are executed in alphabetical order (but they shouldn't have dependencies). Helper files start with helper and loaded before any tests are run.

Usage

1
test_dir(path, filter = NULL, reporter = "summary", env = test_env(), ...)

Arguments

path

path to tests

filter

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 "test-" and ".R".

reporter

reporter to use

env

environment in which to execute test suite.

...

Additional arguments passed to grepl to control filtering.

Value

the results as a "testthat_results" (list)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.