test_that("seconds function is correct", {
expect_equal(seconds(2, "days"), 172800)
expect_equal(seconds(2, "hours"), 7200)
expect_condition(seconds(2, "minutes"), regexp = ".*unsupported.*")
})
test_that("days function is correct", {
expect_equal(days(3600, "seconds"), 1/24)
expect_equal(days(24, "hours"), 1)
expect_condition(days(2, "minutes"), regexp = ".*unsupported.*")
})
test_that("hours function is correct", {
expect_equal(hours(1, "days"), 24)
expect_equal(hours(5), 5)
expect_condition(hours(2, "minutes"), regexp = ".*unsupported.*")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.