tests/testthat/test-formatSeconds.R

context("Formatting seconds")
test_that("Seonds are properly formatted", {
    expect_false(grepl("minutes", formatSeconds(50)))
    expect_true(grepl("minutes", formatSeconds(100)))
    expect_false(grepl("hours", formatSeconds(3000)))
    expect_true(grepl("hours", formatSeconds(4000)))
})

Try the oosse package in your browser

Any scripts or data that you put into this service are public.

oosse documentation built on May 29, 2024, 10:35 a.m.