tests/testthat/test-s3-clock_weekday.R

test_that("clock_weekday", {
  skip_if_not_installed("clock")
  expect_snapshot({
    construct(clock::weekday(1))
    construct(clock::weekday(c(1, 7, NA)))
    construct(clock::weekday(integer()))
    construct(clock::weekday(1:2), opts_clock_weekday("next"))
    construct(clock::weekday(1:2), opts_clock_weekday("integer"))
  })
})

Try the constructive package in your browser

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

constructive documentation built on Oct. 22, 2026, 5:07 p.m.