tests/testthat/test-mapping.R

context("test-mapping")


test_that("build_aes works", {
  
  mapping <- build_aes(iris, x = "Sepal.Width")
  expect_true(is.list(mapping))
  expect_length(mapping, 1)
  
  mapping <- build_aes(iris, x = "Sepal.Width",  y = "Sepal.Width")
  expect_true(is.list(mapping))
  expect_length(mapping, 2)
  
  
  mapping <- build_aes(iris, x = "Sepal.Width", geom = "boxplot")
  expect_true(is.list(mapping))
  expect_length(mapping, 2)
})

Try the esquisse package in your browser

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

esquisse documentation built on Sept. 18, 2024, 5:09 p.m.