tests/testthat/test_api.R

context('API error handling')

test_that('unavailable API yields informative error message', {
  expect_error({
    osem_boxes(endpoint = 'example.zip')
  }, 'The API at example.zip is currently not available')
})

Try the opensensmapr package in your browser

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

opensensmapr documentation built on March 31, 2023, 11:45 p.m.