Learn R Programming

teal.logger (version 0.4.1)

suppress_logs: Suppress logger logs

Description

This function suppresses logger when running tests via testthat. To suppress logs for a single test, add this function call within the testthat::test_that expression. To suppress logs for an entire test file, call this function at the start of the file.

Usage

suppress_logs()

Arguments

Value

NULL invisible

Examples

Run this code
if (FALSE) { # require("logger") && require("testthat")
testthat::test_that("An example test", {
  suppress_logs()
  testthat::expect_true(TRUE)
})
}

Run the code above in your browser using DataLab