An expectation checks whether a single condition holds
true. testthat currently provides the following
expectations. See their documentation for more details
Usage
expect_that(object, condition, info = NULL, label = NULL)
Arguments
object
object to test
condition,
a function that returns whether or not
the condition is met, and if not, an error message to
display.
label
object label. When NULL, computed
from deparsed object.
info
extra information to be included in the
message (useful when writing tests in loops).