tests/testthat/test-weather_forecast.R

with_mock_api({
  test_that("need to provide weather variables", {
    expect_error(
      weather_forecast(c(52.52437, 13.41053)),
      "hourly or daily measure not supplied"
    )
  })
})

Try the openmeteo package in your browser

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

openmeteo documentation built on Oct. 25, 2023, 5:07 p.m.