tests/testthat/test-standalone.R

test_that("gitcreds is standalone", {
  stenv <- environment(gitcreds_get)
  objs <- ls(stenv, all.names = TRUE)
  funs <- Filter(function(x) is.function(stenv[[x]]), objs)
  funobjs <- mget(funs, stenv)
  for (f in funobjs) expect_identical(environmentName(topenv(f)), "base")

  expect_message(
    mapply(codetools::checkUsage, funobjs, funs,
           MoreArgs = list(report = message)),
    NA)
})

Try the gitcreds package in your browser

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

gitcreds documentation built on Sept. 8, 2022, 5:08 p.m.