tests/testthat/helper_skip_functions.R

skip_if_local_and_slow_internet <- function(x) {
  testthat::skip_if_not_installed("pingr")
  x <- (mean(pingr::ping("www.google.com", count = 10)) > 10) &&
       !identical(Sys.getenv("CI"), "true")
  testthat::skip_if(x, paste("On local and slow internet"))
}

skip_if_chrome_not_available <- function() {
  testthat::skip_if_not(
    is_chrome_installed, "chrome not available"
  )
}

Try the wdpar package in your browser

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

wdpar documentation built on Oct. 7, 2024, 9:07 a.m.