Skip to content

Commit 95b9d97

Browse files
committed
Use ggplot2 conditionally
1 parent cbe289b commit 95b9d97

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tests/testthat/test-expect-doppelganger.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
vdiffr_skip_stale()
22

33
test_that("ggplot doppelgangers pass", {
4+
skip_if_not_installed("ggplot2")
45
p1_orig <- ggplot2::ggplot(mtcars, ggplot2::aes(disp)) + ggplot2::geom_histogram()
56
expect_doppelganger("myplot", p1_orig, "")
67
})

tests/testthat/test-ggplot.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
vdiffr_skip_stale()
2+
skip_if_not_installed("ggplot2")
23

34
test_that("ggtitle is set correctly", {
45
p <- ggplot2::ggplot()

0 commit comments

Comments
 (0)