R/expect_ggplot.R

Defines functions expect_ggplot

# helper function for tests

expect_ggplot <- function(g) {
  requireNamespace("testthat")
  testthat::expect_is(g, "ggplot")

  ggsave(nullfile(), g, device = "pdf")
}
dynverse/dynplot documentation built on Dec. 12, 2021, 9:39 p.m.