tests/testthat/test-deprecation-warning.R

test_that("API deprecation warning is shown once per session", {
  original_value <- .dawaR_env$deprecation_warning_shown
  on.exit({
    .dawaR_env$deprecation_warning_shown <- original_value
  })

  .dawaR_env$deprecation_warning_shown <- FALSE

  expect_warning(
    warn_api_deprecation(),
    "DAWA is deprecated.*October 1, 2026"
  )
  expect_no_warning(warn_api_deprecation())
})

Try the dawaR package in your browser

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

dawaR documentation built on Aug. 28, 2026, 1:06 a.m.