tests/testthat/test-covr.R

test_that("using_covr() works as expected", {
  withr::with_envvar(
    new = c("R_COVR" = "true"),
    expect_true(using_covr())
  )

  withr::with_envvar(
    new = c("R_COVR" = NA),
    expect_false(using_covr())
  )
})

Try the ami package in your browser

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

ami documentation built on April 4, 2025, 2:39 a.m.