tests/testthat/test-check.R

context("check")

test_that("it works", {
  setup({
    jetpack::init()

    expect_equal(TRUE, jetpack::check())

    write("Package: app\nImports:\n    DBI", file="DESCRIPTION")

    expect_output(jetpack::check(), "Run 'jetpack::install()' to install them", fixed=TRUE)
    expect_equal(FALSE, jetpack::check())
  })
})

Try the jetpack package in your browser

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

jetpack documentation built on Oct. 31, 2022, 5:07 p.m.