Skip to content

Commit

Permalink
switch to testthat3
Browse files Browse the repository at this point in the history
  • Loading branch information
joethorley committed Sep 20, 2021
1 parent eafb326 commit b22ec7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Imports:
hms
Suggests:
covr,
testthat
testthat (>= 3.0.0)
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-timer.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test_that("tmr_timer", {
expect_is(tmr_timer(), c("hms", "timediff"))
expect_s3_class(tmr_timer(), c("hms", "timediff"))

x <- tmr_timer(3)
expect_identical(x, hms::as_hms(x))
Expand All @@ -18,7 +18,7 @@ test_that("tmr_timer", {
expect_error(tmr_timer(0, c(TRUE, FALSE)), "`start` must be a scalar[.]$")

x <- tmr_timer(0, start = TRUE)
expect_is(attr(x, "start"), "numeric")
expect_type(attr(x, "start"), "double")
})

test_that("tmr_is_started", {
Expand Down

0 comments on commit b22ec7d

Please sign in to comment.