From 4927264481b976bb9782f1a1670c6281bf2bdb5b Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Tue, 20 May 2025 12:00:46 -0400 Subject: [PATCH] test themed packages conditionally --- tests/testthat/test-theme.R | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/testthat/test-theme.R b/tests/testthat/test-theme.R index 638eb194..b98a5562 100644 --- a/tests/testthat/test-theme.R +++ b/tests/testthat/test-theme.R @@ -7,25 +7,37 @@ skip_if_not_installed("withr") install_dev_package() test_that("render flextable", { + skip_if_not_installed("bslib") + skip_if_not_installed("flextable") .render(test_path("theme/flextable.qmd")) }) test_that("render ggiraph", { + skip_if_not_installed("bslib") + skip_if_not_installed("ggiraph") .render(test_path("theme/ggiraph.qmd")) }) test_that("render ggplot2", { + skip_if_not_installed("bslib") + skip_if_not_installed("ggplot2") .render(test_path("theme/ggplot2.qmd")) }) test_that("render gt", { + skip_if_not_installed("bslib") + skip_if_not_installed("gt") .render(test_path("theme/gt.qmd")) }) test_that("render plotly-r", { + skip_if_not_installed("bslib") + skip_if_not_installed("plotly") .render(test_path("theme/plotly-r.qmd")) }) test_that("render thematic", { + skip_if_not_installed("bslib") + skip_if_not_installed("thematic") .render(test_path("theme/thematic.qmd")) })