tests/testthat/helper-session.R

# Since testServer() quotes its `expr`, splice the caller's expression in
# rather than forwarding the promise, which would evaluate outside the session.
with_session <- function(expr) {
  eval(
    substitute(shiny::testServer(function(input, output, session) NULL, expr)),
    parent.frame()
  )
}

Try the reactives package in your browser

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

reactives documentation built on Nov. 2, 2026, 9:06 a.m.