tests/testthat/test-ggplot.R

vdiffr_skip_stale()
skip_if_not_installed("ggplot2")

test_that("ggtitle is set correctly", {
  p <- ggplot2::ggplot()
  expect_doppelganger("Some title", p)
  expect_doppelganger("Some other title", p + ggplot2::ggtitle(NULL))
})

Try the vdiffr package in your browser

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

vdiffr documentation built on Oct. 31, 2024, 5:08 p.m.