tests/testthat/test-pls.R

test_that('check_args() works', {
  skip_on_cran()
  skip_if_not_installed("parsnip", "1.2.1.9001")
  
  expect_snapshot(
    error = TRUE,
    {
      spec <- parsnip::pls(num_comp = -1) %>% 
        set_engine("mixOmics") %>%
        set_mode("regression")
      fit(spec, mpg ~ ., data = mtcars)
    }
  )
})
topepo/projections documentation built on Oct. 16, 2024, 7:10 p.m.