tests/testthat/test-guides.R

context("Guides")

test_that("colourbar trains without labels", {
  g <- guide_colorbar()
  sc <- scale_colour_continuous(limits = c(0, 4), labels = NULL)

  out <- guide_train(g, sc)
  expect_equal(names(out$key), c("colour", ".value"))
})
eddelbuettel/lwplot documentation built on July 11, 2024, 1:24 p.m.