tests/testthat/test-themes.R

context("ggplot themes")

baseplot <- ggplot(mtcars) + 
  geom_point(aes(x = wt, y = mpg, colour = factor(gear))) + 
  facet_wrap(~am)

test_that("esmisc",{
  ggedi <- baseplot +
    theme_edi()
  # test background is white
  expect_true(ggedi$theme$panel.background$fill == 'white')
  expect_true(is.theme(theme_edi()))
})

Try the esmisc package in your browser

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

esmisc documentation built on May 2, 2019, 3:26 p.m.