Skip to content

Commit 8b2a3ba

Browse files
test themed packages conditionally (#243)
1 parent b178fb0 commit 8b2a3ba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/testthat/test-theme.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,37 @@ skip_if_not_installed("withr")
77
install_dev_package()
88

99
test_that("render flextable", {
10+
skip_if_not_installed("bslib")
11+
skip_if_not_installed("flextable")
1012
.render(test_path("theme/flextable.qmd"))
1113
})
1214

1315
test_that("render ggiraph", {
16+
skip_if_not_installed("bslib")
17+
skip_if_not_installed("ggiraph")
1418
.render(test_path("theme/ggiraph.qmd"))
1519
})
1620

1721
test_that("render ggplot2", {
22+
skip_if_not_installed("bslib")
23+
skip_if_not_installed("ggplot2")
1824
.render(test_path("theme/ggplot2.qmd"))
1925
})
2026

2127
test_that("render gt", {
28+
skip_if_not_installed("bslib")
29+
skip_if_not_installed("gt")
2230
.render(test_path("theme/gt.qmd"))
2331
})
2432

2533
test_that("render plotly-r", {
34+
skip_if_not_installed("bslib")
35+
skip_if_not_installed("plotly")
2636
.render(test_path("theme/plotly-r.qmd"))
2737
})
2838

2939
test_that("render thematic", {
40+
skip_if_not_installed("bslib")
41+
skip_if_not_installed("thematic")
3042
.render(test_path("theme/thematic.qmd"))
3143
})

0 commit comments

Comments
 (0)