From 172c0d361dbf913014477a4dbb47bbd51291f813 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 9 Nov 2022 14:25:40 -0800 Subject: [PATCH 1/2] skip test on pre-3.4.0 ggplot2 --- tests/testthat/test-ggplot-blank.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test-ggplot-blank.R b/tests/testthat/test-ggplot-blank.R index 24b69d4e8b..c192368e05 100644 --- a/tests/testthat/test-ggplot-blank.R +++ b/tests/testthat/test-ggplot-blank.R @@ -1,5 +1,6 @@ test_that("geom_blank", { + skip_if_not_installed("ggplot2", "3.4.0") qp <- expect_warning(qplot(), "deprecated") l <- ggplotly(qp)$x From 826010fa4e875b76682f00a1bf0da2a36b4fea2e Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 9 Nov 2022 14:32:30 -0800 Subject: [PATCH 2/2] also in test-ggplot-polygons.R --- tests/testthat/test-ggplot-polygons.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test-ggplot-polygons.R b/tests/testthat/test-ggplot-polygons.R index cd618dedbf..82bd1728e9 100644 --- a/tests/testthat/test-ggplot-polygons.R +++ b/tests/testthat/test-ggplot-polygons.R @@ -121,6 +121,7 @@ test_that("geom_polygon(aes(linetype), fill, color)", { }) test_that("geom_polygon(aes(size), fill, colour)", { + skip_if_not_installed("ggplot2", "3.4.0") size_plot <- function() { ggplot(poly.df) + geom_polygon(aes(x, y, size = lab), fill = "orange", colour = "black") +