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")
})
SahaRahul/ggplot2 documentation built on May 17, 2019, 1:46 p.m.