tests/testthat/test-empty-services.R

test_that("empty feature services returns empty df", {
  skip_on_cran()
  furl <- "https://services1.arcgis.com/hLJbHVT9ZrDIzK0I/arcgis/rest/services/test-empty/FeatureServer/0"

  layer <- arc_open(furl)

  feats <- arc_select(layer)
  expect_identical(
    arcgisutils::fields_as_ptype_df(list_fields(layer)),
    feats
  )
})

Try the arcgislayers package in your browser

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

arcgislayers documentation built on March 4, 2026, 9:06 a.m.