From 8a1e32e30af089bef0a6f371cb98e84de578a60c Mon Sep 17 00:00:00 2001 From: olivroy Date: Tue, 5 Aug 2025 10:09:31 -0400 Subject: [PATCH] Remove tests relying on leaflet datasets being sp objects --- inst/tinytest/test-mapview.R | 46 ++---------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/inst/tinytest/test-mapview.R b/inst/tinytest/test-mapview.R index 2b7066f1f..d04b5218b 100644 --- a/inst/tinytest/test-mapview.R +++ b/inst/tinytest/test-mapview.R @@ -293,28 +293,7 @@ expect_true(inherits(map@map, "leaflet")) expect_equal(typeof(map@object), "list") expect_true(inherits(map@object[[1]], "SpatialPixelsDataFrame")) -### SpatialLines ----- -library(sp) -library(leaflet) - -## mapview -map = mapview(as(atlStorms2005, "SpatialLines")) - -expect_true(inherits(map, "mapview")) -expect_true(inherits(map@map, "leaflet")) -expect_equal(typeof(map@object), "list") -expect_true(inherits(map@object[[1]], "sfc")) - -## mapView -map = mapView(as(atlStorms2005, "SpatialLines")) - -expect_true(inherits(map, "mapview")) -expect_true(inherits(map@map, "leaflet")) -expect_equal(typeof(map@object), "list") -expect_true(inherits(map@object[[1]], "sfc")) - -### SpatialLinesDataFrame ----- -library(sp) +### sf SFC_LINESTRING ----- library(leaflet) ## mapview @@ -333,28 +312,7 @@ expect_true(inherits(map@map, "leaflet")) expect_equal(typeof(map@object), "list") expect_true(inherits(map@object[[1]], "sfc")) -### SpatialPoints ----- -library(sp) -library(leaflet) - -## mapview -map = mapview(as(breweries91, "SpatialPoints")) - -expect_true(inherits(map, "mapview")) -expect_true(inherits(map@map, "leaflet")) -expect_equal(typeof(map@object), "list") -expect_true(inherits(map@object[[1]], "sfc")) - -## mapView -map = mapView(as(breweries91, "SpatialPoints")) - -expect_true(inherits(map, "mapview")) -expect_true(inherits(map@map, "leaflet")) -expect_equal(typeof(map@object), "list") -expect_true(inherits(map@object[[1]], "sfc")) - -### SpatialPointsDataFrame ----- -library(sp) +### sf sfc_point ----- library(leaflet) ## mapview