tests/testthat/test-scale-hue.R

test_that("scale_hue() checks the type input", {
  pal <- qualitative_pal(type = 1:4)
  expect_snapshot_error(pal(4))
  pal <- qualitative_pal(type = colors())
  expect_silent(pal(4))
  pal <- qualitative_pal(type = list(colors()[1:10], colors()[11:30]))
  expect_silent(pal(4))
})

Try the ggplot2 package in your browser

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

ggplot2 documentation built on Oct. 12, 2023, 5:08 p.m.