tests/testthat/helpers.R

skip_if_interactive <- function() {
  testthat::skip_if(interactive())
}

skip_if_http_error <- function() {
  remote_file <- "https://api.beta.ons.gov.uk/v1/datasets"
  get_remote_file <- GET(remote_file)
  skip_if(httr::http_error(get_remote_file))
}

Try the onsr package in your browser

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

onsr documentation built on May 29, 2024, 2:50 a.m.