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")
})
duthedd/ggplot2 documentation built on May 20, 2019, 11:13 a.m.