From d95a8fc17744b700e1bcbcf47292bc27aada26d5 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Tue, 21 Feb 2023 15:39:43 -0800 Subject: [PATCH] Optionally skip tests requiring 'svglite' --- tests/testthat/test-ggsave.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testthat/test-ggsave.R b/tests/testthat/test-ggsave.R index 6513704538..2d21bfcf15 100644 --- a/tests/testthat/test-ggsave.R +++ b/tests/testthat/test-ggsave.R @@ -27,6 +27,7 @@ test_that("ggsave restores previous graphics device", { }) test_that("ggsave uses theme background as image background", { + skip_if_not_installed("svglite") skip_if_not_installed("xml2") path <- tempfile() @@ -43,6 +44,7 @@ test_that("ggsave uses theme background as image background", { }) test_that("ggsave can handle blank background", { + skip_if_not_installed("svglite") skip_if_not_installed("xml2") path <- tempfile()