tests/testthat/test_plotting.R

library(qualpalr)

test_that("plotting checks for errors", {
  f <- qualpal(5)

  expect_error(dont_plot(f, pairs, colorspace = "f"))
})

test_that("plotting functions work as expected", {
  f <- qualpal(4)

  expect_silent(dont_plot(f))
  expect_silent(dont_plot(f, pairs))
  expect_silent(dont_plot(f, pairs, colorspace = "DIN99d"))
})

Try the qualpalr package in your browser

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

qualpalr documentation built on Jan. 30, 2026, 1:06 a.m.