Skip to content

Commit

Permalink
test: Skip tests if packages are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Nov 10, 2023
1 parent be26c70 commit 2e5707d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/testthat/test-vignette-formats.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
test_that("formats vignette", {
skip_if_not_installed("knitr", "1.34.2")
skip_if_not_installed("dplyr")
skip_if_not_installed("formattable")
skip_if_not_installed("ggplot2")
skip_if_not_installed("tidyr")

# Fails on Linux
test_galley("formats")
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat/test-vignette-types.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
test_that("types vignette", {
skip_if_not_installed("dplyr")
skip_if_not_installed("tidyr")
skip_if_not_installed("purrr")

test_galley("types", variant = rlang_variant())
})

0 comments on commit 2e5707d

Please sign in to comment.