R/test_functions.R
is_identical_to_ref.Rd
Functions to be used in testthat test of the project
is_identical_to_ref(name, part = NULL, attr = NULL)
is_equal_to_ref(name, part = NULL, attr = NULL)
is_rendered(quarto, format = "html")
is_rendered_current(quarto, format = "html")
is_data(name, dir = "data", format = "rds", check_df = FALSE)
is_data_df(name, dir = "data", format = "rds", check_df = TRUE)
has_labels_all(name, part = NULL)
has_labels_any(name, part = NULL)
has_units_all(name, part = NULL)
has_units_any(name, part = NULL)
is_display_equation(text, object)
is_display_param_equation(text, object)
is_inline_equation(text, object)
is_inline_param_equation(text, object)
The name of the result and reference files
The part(s) (list item(s)) to co=pare
The attribute(s) to compare
The name of the Quarto or R Markdown file
The format of the rendered file. For is_rendered()
or is_rendered_current()
it is "html'
by default. For the other function, the default is "rds"
The subdirectory in the package where to look for ("data"
by default)
Check if the data file contains a data frame
The text to check
The object to look for in the eq__()
function
TRUE
if the result is identical to the reference, FALSE
otherwise