Open AndyOGo opened 3 months ago
The React 19 RC Upgrade Guide says:
We recommend migrating your tests to @testing-library/react or @testing-library/react-native for a modern and well supported testing experience.
So I guess Jest's docs and examples should be updated accordingly. @AndyOGo would you be up to putting together a PR?
Thanks for your quick reply @mrazauskas
Well @testing-library/react
is a library to write integration tests, it doesn't support shallow snapshot testing nor snapshot diffing.
IMHO these testing approaches pose an anti-pattern and promote bad practices, completely invalidating the first layer of the testing pyramid - unit tests. https://martinfowler.com/articles/practical-test-pyramid.html
So perhaps both pages (Testing React Apps and Testing React Native Apps) should be simply removed?
I see that https://jestjs.io/docs/testing-frameworks already includes @testing-library/react
under the Testing ReactJS components with Jest entry.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
@facebook-github-bot this isn't resolved yet
Happy to just delete the articles, if you're up for sending a PR
@SimenB
The deprecation of react-test-renderer
affects more than just those doc pages.
IMHO someone who knows this repo well should take care to analyze and to carry out all of the required changes.
A quick search reveals at least something of what has to be done - it seems pretty-format
has some implicit or explicit dependency too (just a guess):
:https://github.com/search?q=repo%3Ajestjs%2Fjest%20react-test-renderer&type=code
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
+1
Page(s)
Description
react-test-renderer
is deprecated.Note: that affects any code using
react-test-renderer
https://github.com/search?q=repo%3Ajestjs%2Fjest%20react-test-renderer&type=code