View source: R/expect-silent.R
expect_silent | R Documentation |
Checks that the code produces no output, messages, or warnings.
expect_silent(object)
object |
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. |
The first argument, invisibly.
Other expectations:
comparison-expectations
,
equality-expectations
,
expect_error()
,
expect_length()
,
expect_match()
,
expect_named()
,
expect_null()
,
expect_output()
,
expect_reference()
,
inheritance-expectations
,
logical-expectations
expect_silent("123")
f <- function() {
message("Hi!")
warning("Hey!!")
print("OY!!!")
}
## Not run:
expect_silent(f())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.