Does code return
This is a special case because
NULL is a singleton so it's possible
check for it either with
expect_equal(x, NULL) or
Object to test.
Supports limited unquoting to make it easier to generate readable failures within a function or for loop. See quasi_label for more details.
Extra information to be included in the message. This argument is soft-deprecated and should not be used in new code. Instead see alternatives in quasi_label.
Used to customise failure messages. For expert use only.
x <- NULL y <- 10 expect_null(x) show_failure(expect_null(y)) #> Failed expectation: #> `y` is not NULL #> #> `actual` is a double vector (10) #> `expected` is NULL