tests/testthat/setup.R

# Capture both stdout AND stderr (cli writes to stderr via message()).
capture_full <- function(expr) {
  e <- substitute(expr)
  parent <- parent.frame()
  out <- utils::capture.output(eval(e, parent))
  msg <- utils::capture.output(eval(e, parent), type = "message")
  paste(c(out, msg), collapse = "\n")
}

Try the masque package in your browser

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

masque documentation built on Nov. 19, 2026, 1:06 a.m.