tests/testthat/test-skippers.R

# test_that("skip_if_onlyread set", {
#   # Test that a skip happens
#   withr::local_envvar(ONLY_READ_TESTS = "yes")
#   expect_condition(skip_if_onlyread(), class = "skip")
# })
#
# test_that("skip_if_onlyread not set", {
#   # Test that a skip doesn't happen
#   withr::local_envvar(ONLY_READ_TESTS = "")
#   expect_condition(skip_if_onlyread(), NA, class = "skip")
# })

Try the REDCapR package in your browser

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

REDCapR documentation built on Aug. 10, 2022, 5:06 p.m.