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 March 31, 2023, 10:21 p.m.