tests/testthat/test-scale_fill_discrete.R

test_that("scale_fill_discrete returns errors", {
  df <- data.frame(x = letters, y = 1)
  p <-  ggplot(df, aes(x, 1, fill = x)) +
    geom_col() +
    scale_fill_discrete_twri()
  expect_warning(print(p))
}
)
TxWRI/twriTemplates documentation built on Oct. 20, 2023, 2:06 p.m.