Skip to content

Commit 047d58b

Browse files
committed
add small test
1 parent a2475fd commit 047d58b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/testthat/test-labellers.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
test_that("facets convert labeller to function", {
2+
f <- facet_grid(foo ~ bar, labeller = "label_both")
3+
expect_type(f$params$labeller, "closure")
4+
5+
f <- facet_wrap(foo ~ bar, labeller = "label_value")
6+
expect_type(f$params$labeller, "closure")
7+
})
8+
19
test_that("label_bquote has access to functions in the calling environment", {
210
labels <- data.frame(lab = letters[1:2])
311
attr(labels, "facet") <- "wrap"

0 commit comments

Comments
 (0)