tests/testthat/helper-shinytest2_options.R

# Setup timeout options for shinytest2 if none are set in options nor on environment variables
if (requireNamespace("withr", quietly = TRUE)) {
  withr::local_options(
    list(
      shinytest2.timeout = getOption(
        "shinytest2.timeout",
        default = Sys.getenv("SHINYTEST2_TIMEOUT", unset = 30 * 1000)
      ),
      shinytest2.load_timeout = getOption(
        "shinytest2.load_timeout",
        default = Sys.getenv("SHINYTEST2_LOAD_TIMEOUT", unset = 60 * 1000)
      ),
      shinytest2.duration = getOption(
        "shinytest2.duration",
        default = Sys.getenv("SHINYTEST2_DURATION", unset = 0.5 * 1000)
      )
    ),
    .local_envir = test_env()
  )
}

Try the teal.picks package in your browser

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

teal.picks documentation built on Oct. 9, 2026, 5:07 p.m.