Skip to content

Commit 9bddfc2

Browse files
Added test to check whether the fix works or not.
1 parent 6e1f979 commit 9bddfc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/testthat/test-ggplot-color.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
df = data.frame(width = 1:3, height = 1:3, col = letters[1:3])
22
test_that("ggplotly automatically converts `color` aes to `colour`", {
3-
ggpenguins <- qplot(width, height,
3+
p <- qplot(width, height,
44
data = df, color = col)
55
# color variable is not shown
6-
color <- plotly_build(ggplotly(ggpenguins, tooltip = c("color")))
6+
color <- plotly_build(ggplotly(p, tooltip = c("color")))
77
# colour (with u!) variable is shown
8-
expect_identical(color$x$data, plotly_build(ggplotly(ggpenguins, tooltip = c("colour")))$x$data)
8+
expect_identical(color$x$data, plotly_build(ggplotly(p, tooltip = c("colour")))$x$data)
99
})
1010

0 commit comments

Comments
 (0)