teardown_env: Run code after all test files

View source: R/test-files.R

teardown_envR Documentation

Run code after all test files

Description

This environment has no purpose other than as a handle for withr::defer(): use it when you want to run code after all tests have been run. Typically, you'll use withr::defer(cleanup(), teardown_env()) immediately after you've made a mess in a ⁠setup-*.R⁠ file.

Usage

teardown_env()

r-lib/testthat documentation built on Feb. 18, 2024, 8:59 p.m.