Skip to content

Commit ca79b9f

Browse files
committed
add skip_if_not_installed()
1 parent 725ed5f commit ca79b9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/testthat/test-paletteer_c.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ test_that("paletteer_c works when called from another function", {
4242
})
4343

4444
test_that("paletteer_c works with ggthemes", {
45+
testthat::skip_if_not_installed("ggthemes")
46+
4547
expect_identical(
4648
length(paletteer_c("ggthemes::Blue", n = 4)),
4749
4L
@@ -54,6 +56,8 @@ test_that("paletteer_c works with ggthemes", {
5456
})
5557

5658
test_that("paletteer_c works with harrypotter", {
59+
testthat::skip_if_not_installed("harrypotter")
60+
5761
expect_identical(
5862
length(paletteer_c("harrypotter::always", n = 4)),
5963
4L

0 commit comments

Comments
 (0)