tests/testthat/test-create_example_pkg.R

# WARNING - Generated by {fusen} from dev/flat_create_example_pkg.Rmd: do not edit by hand

test_that("create_example_pkg works", {
  expect_error(pkgdir <- create_example_pkg(), regexp = NA)

  if (requireNamespace("usethis", quietly = TRUE) &
    requireNamespace("attachment", quietly = TRUE)) {
    expect_true(all(c("DESCRIPTION", "man", "NAMESPACE", "R") %in% list.files(pkgdir)))
    expect_true(file.exists(file.path(pkgdir, "R", "function.R")))
    # clean state
    unlink(pkgdir, recursive = TRUE)
  }
})

Try the checkhelper package in your browser

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

checkhelper documentation built on May 29, 2024, 1:17 a.m.