Skip to content

Commit bd4a77d

Browse files
committed
add a test
1 parent ede5c0a commit bd4a77d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/testthat/test-ggplot-point.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,12 @@ test_that("can plot on sub-second time scale", {
4343
info <- save_outputs(g, "point-size-alpha2")
4444
expect_equivalent(info$data[[1]]$x, as.numeric(d$x))
4545
})
46+
47+
48+
test_that("tickvals/ticktext are appropriately boxed", {
49+
d <- data.frame(x = factor(1), y = 10)
50+
p <- qplot(x, y, data = d)
51+
info <- save_outputs(g, "point-box")
52+
expect_true(plotly::to_JSON(info$layout$xaxis$tickvals) == '[1]')
53+
expect_true(plotly::to_JSON(l$layout$xaxis$tickvals) == '["56"]')
54+
})

0 commit comments

Comments
 (0)