tests/testthat/test-blueprint-recipe.R

test_that("`recipe` argument is validated", {
  expect_snapshot(error = TRUE, {
    new_recipe_blueprint(recipe = 1)
  })
})

test_that("`recipe` argument allows `NULL`", {
  x <- new_recipe_blueprint(recipe = NULL)
  expect_null(x$recipe)
})

Try the hardhat package in your browser

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

hardhat documentation built on June 22, 2024, 10:06 a.m.