tests/testthat/test01_scan.R

context("Scan project files")


test_that("Scanning R works",
{
    expect_is(res <- scan_project_files("../project", scan_r_only=TRUE, scan_rprofile=FALSE), "list")
    expect_identical(res$pkg, c("rlang", "darts"))
})


test_that("Scanning R+Rmd works",
{
    expect_is(res <- scan_project_files("../project", scan_r_only=FALSE, scan_rprofile=FALSE), "list")
    expect_identical(res$pkg, c("magrittr", "rlang", "darts", "rmarkdown"))
})


test_that("Scanning with manifest works",
{
    expect_is(res <- scan_project_files("../project_mft", scan_r_only=TRUE, scan_rprofile=FALSE), "list")
    expect_identical(res$pkg, c("rlang", "darts", "github::RevolutionAnalytics/checkpoint@testpkg"))
})

Try the checkpoint package in your browser

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

checkpoint documentation built on Jan. 29, 2022, 1:07 a.m.