tests/testthat/test-control.R

test_that("can create a basic workflow control object", {
  expect_s3_class(control_workflow(), "control_workflow")
})

test_that("default parsnip control is created", {
  expect_equal(control_workflow()$control_parsnip, parsnip::control_parsnip())
})

test_that("parsnip control is validated", {
  expect_snapshot(error = TRUE, {
    control_workflow(control_parsnip = 1)
  })
})

Try the workflows package in your browser

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

workflows documentation built on May 29, 2024, 3:57 a.m.