Skip to content

Commit e720a51

Browse files
committed
Specify origin for numeric->date coercion in unit test
1 parent 270d20e commit e720a51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/testthat/test-ggplot-lines.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ test_that("Milliseconds are preserved with dynamic ticks", {
5050
p <- ggplotly(gg, dynamicTicks = TRUE)
5151
j <- plotly_json(p, jsonedit = FALSE)
5252
t2 <- jsonlite::fromJSON(j)$data$x[[1]] %>%
53-
as.POSIXct(format = "%Y-%m-%d %H:%M:%OS")
53+
as.POSIXct(format = "%Y-%m-%d %H:%M:%OS", origin = "1970-01-01 00:00:00")
5454
expect_equal(as.numeric(mean(diff(t2))), 0.1, tolerance = 0.01)
5555
expect_doppelganger_built(p, "line-milliseconds")
5656
})

0 commit comments

Comments
 (0)