expect_success {testthat} | R Documentation |
Tools for testing expectations
Description
-
expect_sucess()
andexpect_failure()
check that there's at least one success or failure respectively. -
expect_snapshot_failure()
records the failure message so that you can manually check that it is informative. -
expect_no_success()
andexpect_no_failure()
check that are no successes or failures.
Use show_failure()
in examples to print the failure message without
throwing an error.
Usage
expect_success(expr)
expect_no_success(expr)
expect_failure(expr, message = NULL, ...)
expect_snapshot_failure(expr)
expect_no_failure(expr)
show_failure(expr)
Arguments
expr |
Code to evalute |
message |
Check that the failure message matches this regexp. |
... |
Other arguments passed on to |
[Package testthat version 3.2.2 Index]