tests/testthat/test-tiles.R

testthat::test_that("Checking of tile providers works correctly", {
  expect_no_error(
    leaflet() %>% addProviderTiles(providers[[1]])
  )

  expect_no_error(
    leaflet() %>% addProviderTiles("FAKETILESET123", check = FALSE)
  )

  expect_error(
    leaflet() %>% addProviderTiles("FAKETILESET123")
  )
})

Try the leaflet package in your browser

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

leaflet documentation built on Sept. 9, 2025, 5:28 p.m.