tests/testthat/test-throw.R

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

Try the cleanr package in your browser

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

cleanr documentation built on July 9, 2023, 7:30 p.m.