tests/testthat/test-utils_packages.R

tar_test("load packages", {
  expect_silent(load_packages(packages = "digest", library = NULL))
  expect_error(
    suppressWarnings(
      load_packages(packages = "does;not;exist", library = NULL)
    ),
    class = "tar_condition_validate"
  )
})

Try the targets package in your browser

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

targets documentation built on Oct. 12, 2023, 5:07 p.m.