R: Run code after all test files

teardown_env {testthat} | R Documentation

## Run code after all test files

### Description

This environment no purpose except as a handle for `withr::defer()`: use this environment when you want to run code until 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()

[Package testthat version 3.0.0 Index]