Skip to contents

This function runs a test_that block quietly, suppressing messages and output from any verbose functions.

Usage

test_quietly_that(desc, code)

Arguments

desc

A description of the test.

code

The code to be tested.

Value

No return value, called for side effects.

Examples

# Run a test quietly
test_quietly_that("quiet test example", {
    testthat::expect_equal(1 + 1, 2)
})
#> Warning: The `code` argument to `test_that()` must be a braced expression to get accurate file-line information for failures.
#> Test passed