tests/testthat/helper-progress.R

local_test_progress <- function(env = parent.frame()) {
  savedir <- withr::local_tempdir(.local_envir = env)
  withr::local_options(list(escapeR.progress_dir = savedir), .local_envir = env)
  state <- getFromNamespace(".state", "escapeR")
  old_player <- state$player
  old_progress <- state$progress
  withr::defer({
    state$player <- old_player
    state$progress <- old_progress
  }, envir = env)
}

Try the escapeR package in your browser

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

escapeR documentation built on Sept. 27, 2026, 5:06 p.m.