find_function_calls_in_folder {assertHE} | R Documentation |
Find specific function calls in a folder
Description
Runs find_function_calls_in_file on all files in a folder, and combined results into a single dataframe
Usage
find_function_calls_in_folder(
test_folder,
foo_strings,
filter_for_test_that = FALSE
)
Arguments
test_folder |
folder containing all tests |
foo_strings |
string vector of function names to search for |
filter_for_test_that |
whether to filter for only functions used after the call to test_that. Default FALSE. |
Value
dataframe with two columns. 'foo' contains function names, location contains the location of the tests for each function (file and line number).
Examples
folder_path <- assertHE_example("example_project/tests/testthat")
find_function_calls_in_folder(
foo_strings = c("calculate_costs", "calculate_QALYs",
"create_Markov_trace", "FOO_WITH_NO_TESTS"),
test_folder = folder_path
)
[Package assertHE version 1.0.0 Index]