Skip to content

Commit 7b15f99

Browse files
committed
fix bad test expectations
1 parent 692840b commit 7b15f99

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/testthat/test-plotly-colorbar.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ test_that("Can expand limits", {
2020
p <- plot_ly(mtcars, x = ~wt, y = ~cyl, color = ~cyl)
2121
p <- colorbar(p, limits = c(0, 20))
2222
l <- expect_traces(p, 2, "colorbar-expand")
23-
expect_equivalent(l$data[[1]]$marker$cmin, 0)
24-
expect_equivalent(l$data[[2]]$marker$cmin, 0)
25-
expect_equivalent(l$data[[1]]$marker$cmax, 20)
26-
expect_equivalent(l$data[[2]]$marker$cmax, 20)
23+
expect_true(l$data[[1]]$marker$cmin == 0)
24+
expect_true(l$data[[2]]$marker$cmin == 0)
25+
expect_true(l$data[[1]]$marker$cmax == 20)
26+
expect_true(l$data[[2]]$marker$cmax == 20)
2727
})
2828

2929
test_that("Can restrict limits", {
3030
p <- plot_ly(mtcars, x = ~wt, y = ~cyl, color = ~cyl)
3131
p <- colorbar(p, limits = c(5, 7))
3232
l <- expect_traces(p, 2, "colorbar-restrict")
3333
expect_equivalent(unique(l$data[[1]]$marker$color), c(6, NA))
34-
expect_equivalent(l$data[[2]]$marker$cmin, 5)
35-
expect_equivalent(l$data[[2]]$marker$cmax, 7)
34+
expect_true(l$data[[2]]$marker$cmin == 5)
35+
expect_true(l$data[[2]]$marker$cmax == 7)
3636
})
3737

3838
test_that("Can expand z limits", {

0 commit comments

Comments
 (0)