Create test files for each source file containing one test_that call for each function in the package

create_test_files(
  package_dir = getwd(),
  target_dir = NULL,
  file_per_function = TRUE,
  full = FALSE,
  dbg = TRUE
)

Arguments

package_dir

path to package directory in which to create the test files

target_dir

directory in which to create the test files. Defaults to <package_dir>/tests/testthat.

file_per_function

if TRUE (default), one test file test-<function>.R is generated for each function, otherwise one test file test-<source-file> is generated for each source file.

full

if TRUE, test calls with many argument combinations are generated instead of only one call

dbg

if TRUE, debug messages are shown

Details

Existing test files will not be overwritten.