Skip to content

Commit

Permalink
added expect_message to truncation unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Feb 7, 2025
1 parent 641ec69 commit 703e2ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/test-truncation.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test_that("truncation works as expected with modified delay", {
})

test_that("truncation works as expected with max_date", {
ll_trunc <- truncation(ll, max_date = "2023-02-01")
expect_message(ll_trunc <- truncation(ll, max_date = "2023-02-01"))
# in this example dataset the df is subset
expect_gt(nrow(ll), nrow(ll_trunc))
expect_true(all(ll_trunc$date_onset < as.Date("2023-02-01")))
Expand Down

0 comments on commit 703e2ef

Please sign in to comment.