tests/testthat/helper_dont_plot.R

# Capture plots without plotting
dont_plot <- function(x, f = graphics::plot, ...) {
  tmp <- tempfile()
  grDevices::png(tmp)
  p <- f(x, ...)
  grDevices::dev.off()
  unlink(tmp)
  invisible(p)
}
jolars/qualpalr documentation built on Sept. 23, 2023, 5:11 p.m.