testthat icon indicating copy to clipboard operation
testthat copied to clipboard

Add support for test files in nested directories

Open radbasa opened this issue 2 years ago • 0 comments

Closes #1605

Allows the use of directories to organize test files.

The recursive argument is optional and defaults to FALSE.

  1. testthat::test_dir("tests/testthat/") will work as before. Just one single directory, and with the default reporter.
  2. testthat::test_dir("tests/testthat/", recursive = TRUE) to run all of the test scripts in all directories in tests/testthat/. testthat::test_dir() will still only see test scripts with ^test.*\\.[rR]$ filenames.

radbasa avatar Aug 29 '23 10:08 radbasa