tests/testthat/test-provider-github.R

test_that("uses to GITHUB_PAT if set", {
  withr::local_envvar(
    GITHUB_PAT = "abc",
    GITHUB_PAT_GITHUB_COM = NA
  )
  expect_equal(github_key(), "abc")
})

Try the ellmer package in your browser

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

ellmer documentation built on April 4, 2025, 3:53 a.m.