expect_func(var, ...)
expect_join(data2, by = NULL, not = FALSE, flt = TRUE, data = get_testdata())
expect_similar(
var,
data2,
var2,
flt = TRUE,
flt2 = flt,
threshold = 0.05,
min = 100,
data = get_testdata()
)
expect_allany(
vars,
func,
flt = TRUE,
data = get_testdata(),
args = list(),
allany = c(chk_filter_all, chk_filter_any),
func_desc = NULL
)
An unquoted column name to test.
Arguments to pass to expect_allany()
.
The data frame to compare against.
A character vector of columns to join by. See dplyr::join()
for
details.
Reverse the results of the check?
<data-masking
> A filter specifying
a subset of the data frame to test.
A data frame to test. The global test data is used by default.
An unquoted column name from data2.
A filter specifying a subset of data2 to test.
The maximum proportional difference allowed between the two categories.
The minimum number of responses for a category to allow comparison. This avoids small categories raising spurious errors.
<tidy-select
> A set of columns to
test.
A function to use for testing that takes a vector as the first argument and returns a logical vector of the same length showing whether an element passed or failed.
A named list of arguments to pass to func
.
The function to combine the func
results for each row.
A human friendly description of func
to use in the
expectation failure message.
expect_*()
functions are mainly called for their side effects. The
expectation signals its result (e.g. "success", "failure"), which is logged
by the current test reporter. In a non-testing
context the expectation will raise an error with class
expectation_failure
if it fails.