Skip to content

Commit 8ac14d6

Browse files
committed
avoid including fragile grobName in snapshot
1 parent 3f396e1 commit 8ac14d6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tests/testthat/_snaps/theme-elements.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,8 @@
6464
---
6565

6666
Code
67-
element_grob(el, label = element_blank())
67+
x <- element_grob(el, label = element_blank())
6868
Condition
6969
Warning:
7070
`label` cannot be a <ggplot2::element_blank> object.
71-
Output
72-
zeroGrob[NULL]
7371

tests/testthat/test-theme-elements.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ test_that("element_text throws appropriate conditions", {
100100
# labs(y = element_blank()) for some reason
101101
el <- theme_get()$text
102102
expect_snapshot(
103-
element_grob(el, label = element_blank())
103+
x <- element_grob(el, label = element_blank())
104104
)
105105
})
106106

0 commit comments

Comments
 (0)