tests/testthat/setup.R

writeLines(
  "If you see me, something has gone wrong with old-school teardown",
  "DELETE-ME"
)
writeLines(
  "If you see me, something has gone wrong with new-school teardown",
  "DELETE-ME-2"
)
withr::defer(unlink("DELETE-ME-2"), teardown_env())
hadley/testthat documentation built on Feb. 16, 2024, 9:20 p.m.