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")
}

Try the dynplot package in your browser

Any scripts or data that you put into this service are public.

dynplot documentation built on Dec. 11, 2021, 9:33 a.m.