inst/tinytest/test_wipe_clean.R

if (interactive()) {
  pkgload::load_all()
  library("tinytest")
}


e <- new.env()
assign("a", 1, envir = e)
expect_identical(ls(envir = e), "a")
result <- wipe_clean(envir = e)
expectation <- "a"
expect_identical(result, expectation)
expect_identical(length(ls(envir = e)), 0L)

Try the fritools package in your browser

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

fritools documentation built on June 8, 2025, 11:59 a.m.