Runs testthat tests in a single .R file. If the file currently open in the
RStudio editor is called my_function.R, test_this() calls
testthat::test_file() on tests/testthat/test_my_function.R. If
the filename of the currently open file with starts with test_ it will
call testthat::test_file() on the current file.
test_this(...)
| ... | passed on to |
|---|
NULL (invisibly)
This is useful in cases where you don't want to run all tests in a package
via devtools::test() (CTRL+SHIFT+T in RStudio).