Creates a testthat directory structure (if needed) and generates a unit test
script aligned with the HTA Verification Registry (T01 - T16). Automatically
substitutes the baseline dataset reference (test_data) with your specified
model data object name.
Usage
use_hta_unittests(
path = ".",
filename = "test-hta_model.R",
data_name = "test_data",
overwrite = FALSE
)Arguments
- path
A character string specifying the root project directory. Defaults to the current working directory (
".").- filename
A character string for the test file name. Defaults to
"test-hta_model.R". Note:testthatrequires file names to begin with"test-".- data_name
A character string specifying the variable name of your model's data object. Defaults to
"test_data".- overwrite
A logical value indicating whether to overwrite an existing file if it already exists. Defaults to
FALSE.
