tests/testthat/test-templates.R

test_that("Templates", {
  info <- infoLog()
  error <- errorLog()
  warn <- warningLog()
  success <- successLog()

  expect_output(info$log("hello"))
  expect_output(error$log("hello"))
  expect_output(warn$log("hello"))
  expect_output(success$log("hello"))
})

Try the log package in your browser

Any scripts or data that you put into this service are public.

log documentation built on March 18, 2022, 6:02 p.m.