A teardown function is the test phase that cleans up after execution and verification, such as deleting files or closing external connections. It belongs alongside Arrange, Act, and Assert as part of a test’s structure. section 3.1
Keep teardown understandable and proportional to the test. As with other test sections, excessive setup or cleanup can make a test harder to read and may signal responsibilities that should be extracted or simplified. section 3.1
