tests/testthat/test-throw.R

testthat::context("Testing excerptr:::throw()")
testthat::test_that("throw the excerptr exception", {
                        error_message <- "hello, testthat"
                        string <- "hello, testthat"
                        testthat::expect_error(excerptr:::throw(string),
                            error_message)
}
)

Try the excerptr package in your browser

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

excerptr documentation built on Aug. 5, 2021, 1:06 a.m.