Skip to content

Commit b5f582b

Browse files
committed
add test
1 parent 56e6d31 commit b5f582b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/testthat/_snaps/layer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747

4848
Ignoring empty aesthetics: `fill` and `shape`.
4949

50+
# aesthetics defined twice create warning
51+
52+
The size aesthetic is defined twice: once in `mapping` and once as a static aesthetic.
53+
i The static aesthetic overrules the mapped aesthetic.
54+
5055
# invalid aesthetics throws errors
5156

5257
Problem while computing aesthetics.

tests/testthat/test-layer.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ test_that("empty aesthetics create warning", {
3333
expect_snapshot_warning(ggplot_build(p))
3434
})
3535

36+
test_that("aesthetics defined twice create warning", {
37+
expect_snapshot_warning(geom_point(aes(size = foo), size = 12))
38+
})
39+
3640
test_that("invalid aesthetics throws errors", {
3741
# We want to test error and ignore the scale search message
3842
suppressMessages({

0 commit comments

Comments
 (0)