Skip to content

Commit aac30a4

Browse files
committed
add a unit test
1 parent a2ceec5 commit aac30a4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
context("customdata")
2+
3+
# TODO: use shinytest to make sure we can access the right value in shiny
4+
test_that("ggplotly relays customdata", {
5+
nms <- row.names(mtcars)
6+
p <- ggplot(mtcars, aes(x = mpg, y = wt, customdata = nms)) + geom_point()
7+
l <- plotly_build(p)
8+
trace <- l$x$data[[1]]
9+
expect_equivalent(trace$customdata, nms)
10+
})

0 commit comments

Comments
 (0)