tests/testthat/test-errors.R

test_that("tracebacks are captured by catch", {
  skip_if(getRversion() < "3.3.0")

  output <- catch(stop("ouch"))
  traceback <- output$traceback

  expect_true(is.character(traceback))
  expect_true(length(traceback) > 0)
})

Try the renv package in your browser

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

renv documentation built on Sept. 19, 2023, 9:06 a.m.