tests/testthat/test-blueprint-formula-default.R

test_that("`levels` argument is validated", {
  expect_snapshot(error = TRUE, {
    new_default_formula_blueprint(levels = 1)
  })
  expect_snapshot(error = TRUE, {
    new_default_formula_blueprint(levels = list(1))
  })
  expect_snapshot(error = TRUE, {
    new_default_formula_blueprint(levels = list("a" = 1))
  })
})

Try the hardhat package in your browser

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

hardhat documentation built on April 4, 2025, 3:18 a.m.