-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
It'd be cool to have a test argument to the make functions that can either be an expression or a file/directory path, that is run at the end to validate the make.
Depending on the type:
- An expression is evaluated as the test set
- A file or directory path is evaluated using
test_dir()ortest_file()as appropriate
Would need to think about how to parse test results while also allowing maximum flexibility, since different testing approaches would return different things (e.g. test_dir/test_file return the test results, an expression block with a test_that call in it would return either NULL or throw an error).
For e.g.
make_with_source(
dependencies = c("data/0_raw_data.csv", "lookup/concordance.csv"),
source = c("1 data_prep.R"),
targets = c("data/1_data.Rds"),
tests = "tests/test-1-data.R"
)kinto-b
Metadata
Metadata
Assignees
Labels
No labels