tests/testthat/test-throw.R

testthat::context("test throw")
testthat::test_that("throw the packager exception", {
                        error_message <- "hello, testthat"
                        testthat::expect_error(throw("hello, testthat"),
                                               error_message)
}
)

Try the packager package in your browser

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

packager documentation built on Aug. 16, 2023, 5:08 p.m.