Comments (7)
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.
from jest.
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?
from jest.
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
from jest.
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.
from jest.
@facebook-github-bot this isn't resolved yet
from jest.
Happy to just delete the articles, if you're up for sending a PR
from jest.
@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
from jest.
Related Issues (20)
- [Feature]: Replace google short urls, since it will not work start of 25th August 2025
- [Feature]: Provide a way to register `pretty-format` plugins for non-snapshot uses HOT 1
- [Bug]: Jest showing wrong coverage report HOT 1
- [Bug]: Async object method issue.
- [Bug]: ReferenceError: queueMicrotask is not defined HOT 1
- [Bug]: npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. HOT 4
- [Docs]: Website deploy is broken HOT 1
- [Bug]: toHaveBeenCalledWith matching issue in jest@^30.0.0-alpha.4
- [Feature]: Support `casting_syntax=as` in Flow files HOT 2
- [Bug]: Jest Worker Process Terminated by Another Process (signal=SIGKILL) in React Native 0.74.0 Project
- [Bug]: Jest does not correctly resolve wildcards in subpath imports
- [Feature]: config.ci option
- [Bug]: Jest fails to read config when coming from external package in TS / ESM / Monorepo
- [Bug]: Jest 27 Fails to Resolve React.memo and Lodash Functions in Tests
- [Docs]: Remove HOT 1
- [Bug]: resetModules breaks instanceof
- [Disregard]: advanceTimersByTime() and task queue flushing - notes
- [Feature]: support NODE_DEBUG
- [Bug]: Custom `testEnvironment` in TypeScript is not transformed with ESM
- [Feature]: Configure jest to fail (non-zero exit) if test suite does not cleanly exit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jest.