Move from enzyme to react testing library #2754
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Why
We use React 18 but Enzyme react adaptor only supports 16. This wasn't an issue until this week our builds started failing to build (see below)
Enzyme seems to be dying a slow death, as there isn't even a react 17 adapter. Meanwhile RTL fully supports React 18 and we want to be able to upgrade in the future.
Migrating to @testing-library is the only logical option. Downgrading React isn't an option.
Addresses #2748
How to review
Who can review
not @kr8n3r
🚨⚠️ Please do not merge this pull request via the GitHub UI ⚠️ 🚨