tests/testthat/test-attach-pkgs.R

test_that("can attach pkgs", {
    skip_on_cran()
    expect_error(attach_pkgs(c("knitr", "readr")), NA)
})

test_that("can fail on a single pkg", {
    skip_on_cran()
    expect_snapshot_error(attach_pkgs(c("potato")))
})

test_that("can fail on multiple pkgs", {
    skip_on_cran()
    expect_snapshot_error(attach_pkgs(c("potato", "bloopy")))
    expect_snapshot_error(attach_pkgs(c("potato", "readr")))
})

Try the vetiver package in your browser

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

vetiver documentation built on Nov. 17, 2023, 1:06 a.m.