Changes
- Added global cleanup that unmounts test components to clean up residual effects between tests (#199)
- Auto register
afterEach
in supported test frameworks to auto run cleanup as per testing-library/react-testing-library#430 - Supports opt out via and environment variable opt out (
RHTL_SKIP_AUTO_CLEANUP=true
)
- Auto register
⚠️ Breaking Changes
- Most users won't be affected by the autoregistration of the auto-cleanup, but if anyone was relying on their effects persiting between tests then this will be a breaking change for them