tests/testthat/test-add.R

context("Adding plot elements")

test_that("mapping class is preserved when adding uneval objects", {
  p <- ggplot(mtcars) + aes(wt, mpg)
  expect_identical(class(p$mapping), "uneval")
})
TomeTiger/ggplot2 documentation built on May 29, 2019, 7:53 a.m.