Giter Club home page Giter Club logo

Comments (7)

github-actions avatar github-actions commented on August 20, 2024 1

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.

mrazauskas avatar mrazauskas commented on August 20, 2024

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.

AndyOGo avatar AndyOGo commented on August 20, 2024

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.

mrazauskas avatar mrazauskas commented on August 20, 2024

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.

AndyOGo avatar AndyOGo commented on August 20, 2024

@facebook-github-bot this isn't resolved yet

from jest.

SimenB avatar SimenB commented on August 20, 2024

Happy to just delete the articles, if you're up for sending a PR

from jest.

AndyOGo avatar AndyOGo commented on August 20, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.