expect_success: Tools for testing expectations

View source: R/expect-self-test.R

expect_successR Documentation

Tools for testing expectations

Description

Use these expectations to test other expectations. Use show_failure() in examples to print the failure message without throwing an error.

Usage

expect_success(expr)

expect_failure(expr, message = NULL, ...)

show_failure(expr)

Arguments

expr

Expression that evaluates a single expectation.

message

Check that the failure message matches this regexp.

...

Other arguments passed on to expect_match().


hadley/testthat documentation built on Feb. 16, 2024, 9:20 p.m.