ignore | R Documentation |
Ignored expectations are not reported in the test results.
Ignoring is only useful for test files, and not for use directly
at the command-line. See also the package vignette: vignette("using_tinytest")
.
ignore(fun)
fun |
|
An ignored function
ignore
is a higher-order function: a function that returns another function.
In particular, it accepts a function and returns a function that is almost identical
to the input function. The only difference is that the return value of the function
returned by ignore
is not caught by run_test_file
and friends.
For example, ignore(expect_true)
is a function, and we can use it as
ignore(expect_true)( 1 == 1)
. The return value of ignore(expect_true)(1==1)
is exactly the same as that for expect_true(1==1)
.
Other test-functions:
expect_equal_to_reference()
,
expect_equal()
,
expect_length()
,
expect_match()
## The result of 'expect_warning' is not stored in the test result when ## this is run from a file. expect_true( ignore(expect_warning)(warning("foo!")) ) ## Note the placement of the brackets in ignore(expect_warning)(...).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.