tests/testthat/test-utils.R

test_that("connections to internet resources fail gracefully", {
  skip_on_cran()
  skip_on_ci()
  suppressMessages(expect_message(fail_gracefully("http://httpbin.org/status/404"), "Not Found \\(HTTP 404\\)"))
  suppressMessages(expect_message(fail_gracefully("http://httpbin.org/delay/2", 1), "Timeout was reached"))
  expect_silent(fail_gracefully("http://httpbin.org/"))
})

Try the flashr package in your browser

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

flashr documentation built on June 8, 2025, 11:39 a.m.