Skip to content

Commit effa091

Browse files
authored
Ensure snapshot tests are static (#1216)
1 parent 81a6678 commit effa091

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/testthat/_snaps/gather.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
they will be dropped
1616
Output
1717
k v
18-
1 date1 1636502400
19-
2 date2 18951
18+
1 date1 1546300800
19+
2 date2 17897
2020

tests/testthat/test-gather.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ test_that("common attributes are preserved", {
165165

166166
test_that("varying attributes are dropped with a warning", {
167167
df <- data.frame(
168-
date1 = as.POSIXct(Sys.Date()),
169-
date2 = Sys.Date() + 10
168+
date1 = as.POSIXct("2019-01-01", tz = "UTC"),
169+
date2 = as.Date("2019-01-01")
170170
)
171171
expect_snapshot(gather(df, k, v))
172172
})

0 commit comments

Comments
 (0)