Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

expect_success

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().


testthat

Unit Testing for R

v3.0.2
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre], RStudio [cph, fnd], R Core team [ctb] (Implementation of utils::recover())
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.