@@ -52,13 +52,25 @@ test_that("facets reject aes()", {
52
52
test_that(" wrap_as_facets_list() returns a quosures object with compacted" , {
53
53
expect_identical(wrap_as_facets_list(vars(foo )), quos(foo = foo ))
54
54
expect_identical(wrap_as_facets_list(~ foo + bar ), quos(foo = foo , bar = bar ))
55
- expect_identical(wrap_as_facets_list(vars(foo , NULL , bar )), quos(foo = foo , bar = bar ))
55
+
56
+ f <- function (x ) {
57
+ expect_identical(wrap_as_facets_list(vars(foo , {{ x }}, bar )), quos(foo = foo , bar = bar ))
58
+ }
59
+
60
+ f(NULL )
61
+ f()
56
62
})
57
63
58
64
test_that(" grid_as_facets_list() returns a list of quosures objects with compacted" , {
59
65
expect_identical(grid_as_facets_list(vars(foo ), NULL ), list (rows = quos(foo = foo ), cols = quos()))
60
66
expect_identical(grid_as_facets_list(~ foo , NULL ), list (rows = quos(), cols = quos(foo = foo )))
61
- expect_identical(grid_as_facets_list(vars(foo , NULL , bar ), NULL ), list (rows = quos(foo = foo , bar = bar ), cols = quos()))
67
+
68
+ f <- function (x ) {
69
+ expect_identical(grid_as_facets_list(vars(foo , {{ x }}, bar ), NULL ), list (rows = quos(foo = foo , bar = bar ), cols = quos()))
70
+ }
71
+
72
+ f(NULL )
73
+ f()
62
74
})
63
75
64
76
test_that(" wrap_as_facets_list() and grid_as_facets_list() accept empty specs" , {
0 commit comments