tests/testthat/test-shrink.R

context("test-shrink")

test_that("an outcome can also be a predictor and is only returned once", {
  x <- mold(Sepal.Length ~ Sepal.Length, iris)

  expect_equal(
    colnames(shrink(iris, x$blueprint$ptypes$predictors)),
    "Sepal.Length"
  )
})
DavisVaughan/hardhat documentation built on Oct. 5, 2021, 9:53 a.m.