tests/testthat/test-s3-constructive_options.R

test_that("constructive_options", {
  expect_snapshot({
    construct(opts_Date("as.Date"))
    construct(opts_Date("as.Date"), opts_constructive_options("next"))
    construct(opts_Date("new_date"))
    construct(opts_Date(origin = "2020-01-01"))
    construct(opts_data.frame("read.table"))
  })
})

Try the constructive package in your browser

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

constructive documentation built on April 3, 2025, 9:39 p.m.