tests/testthat/test-use-packer.R

source("../fns.R")

skip_on_cran()

test_that("use packer", {
  wd <- getwd()
  pkg <- create_tmp_package()
  setwd(pkg)
  on.exit({
    setwd(wd)
    delete_tmp_package(pkg)
  })

  scaffold()
  expect_error(use_packer())
  packer::scaffold_leprechaun(edit = FALSE)
  expect_error(use_js_utils())
  expect_message(use_packer())
  expect_message(use_js_utils())
  expect_true(use_packer())
})

Try the leprechaun package in your browser

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

leprechaun documentation built on Jan. 19, 2022, 5:08 p.m.