test {devtools} | R Documentation |
test()
is a shortcut for testthat::test_dir()
, it runs all of a
package's tests.
test_file
runs test()
on the active file.
test_coverage()
computes test coverage for your package. It is a shortcut
for covr::package_coverage()
and covr::report()
.
test_coverage_file()
computes test coverage for the active file. Is a
shortcut for covr::file_coverage()
and covr::report()
.
test(pkg = ".", filter = NULL, stop_on_failure = FALSE, export_all = TRUE, ...) test_coverage(pkg = ".", show_report = interactive(), ...) uses_testthat(pkg = ".") test_file(file = find_active_file(), ...) test_coverage_file( file = find_active_file(), filter = TRUE, show_report = interactive(), export_all = TRUE, ... )
pkg |
The package to use, can be a file path to the package or a
package object. See |
filter |
If not |
stop_on_failure |
If For historical reasons, the default value of |
export_all |
If |
... |
additional arguments passed to |
show_report |
Show the test coverage report. |
file |
One or more source or test files. If a source file the corresponding test file will be run. The default is to use the active file in RStudio (if available). |