Skip to content

Commit ac57d36

Browse files
committed
re-surface an old test
1 parent 6784580 commit ac57d36

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/testthat/test-ggplot-labels.R

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ test_that("ylab is translated correctly", {
1717
expect_identical(labs, c("Petal.Width", "sepal width"))
1818
})
1919

20-
# TODO: why is this failing on R-devel???
21-
#test_that("scale_x_continuous(name) is translated correctly", {
22-
# ggiris <- ggplot(iris) +
23-
# geom_point(aes(Petal.Width, Sepal.Width)) +
24-
# scale_x_continuous("petal width")
25-
# info <- expect_doppelganger_built(ggiris, "labels-scale_x_continuous_name")
26-
# labs <- unlist(lapply(info$layout$annotations, "[[", "text"))
27-
# expect_identical(sort(labs), c("petal width", "Sepal.Width"))
28-
#})
20+
test_that("scale_x_continuous(name) is translated correctly", {
21+
ggiris <- ggplot(iris) +
22+
geom_point(aes(Petal.Width, Sepal.Width)) +
23+
scale_x_continuous("petal width")
24+
info <- expect_doppelganger_built(ggiris, "labels-scale_x_continuous_name")
25+
labs <- c(info$layout$xaxis$title$text, info$layout$yaxis$title$text)
26+
expect_identical(labs, c("petal width", "Sepal.Width"))
27+
})
2928

3029
test_that("angled ticks are translated correctly", {
3130
ggiris <- ggplot(iris) +

0 commit comments

Comments
 (0)