tests/testthat/test-list-helpers.R

gc_test_that("gitcreds_list_helpers", os = c("windows", "macos"), {
  # no helpers at all
  local_helpers(character())
  expect_equal(gitcreds_list_helpers(), character())

  # custom helpers
  local_helpers(c("foo", "bar"))
  expect_equal(gitcreds_list_helpers(), c("foo", "bar"))

  # resetting helpers
  local_helpers(c("reset", "\"\"", "foobar"))
  expect_equal(gitcreds_list_helpers(), c("foobar"))
})

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.