Replace react-test-renderer. #2136
Labels
chore
Maintain a clean and strong character.
dependencies
Pull requests that update a dependency file
high priority
testing
update
change something to be something else
react-test-renderer has been deprecated - seeing as all of our unit tests are written using this (not counting those written using Enzyme, which we were already addressing with #2118), which means all of our unit tests will have to be rewritten using whatever the modern standard solution is.
This appears to be @testing-library/react.
Critically, our current approach to writing tests is to test implementation details - inspecting a rendered component's DOM tree and making sure there are certain things in certain locations with certain properties. This is apparently contrary to the industry-standard approach to writing tests, which is to test behavior details - using aria properties and finding elements according to their roles, etc.
Changing tests to fit the 'behavior' approach will be bad enough, but it appears as though we'll also need to update everything to a more recent version of React in the first place in order to support current versions of the modern testing libraries (see #2137).
The text was updated successfully, but these errors were encountered: