tests/testthat/test-list-reporter/test-exception-outside-tests.R

# the objective is to test what happens if some code fails outside of tests
# i.e. not inside a test_that() call.

test_that("before", expect_true(TRUE))

stop('dying outside of tests')

test_that("after", expect_true(TRUE))
r-lib/testthat documentation built on Feb. 18, 2024, 8:59 p.m.