tests/testthat/test-check_api_key.R

test_that("check_api_key works", {
  skip_on_cran()
  testthat::skip_if(Sys.getenv("PURPLE_AIR_API_KEY") == "", "no PurpleAir API key present")
  testthat::skip_if_offline()
  check_api_key() |>
    expect_message("Using valid")
})

Try the PurpleAir package in your browser

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

PurpleAir documentation built on Oct. 9, 2024, 1:07 a.m.