Was there an official decision to migrate from Enzyme to Testing Library? #10760
Replies: 1 comment
-
source: https://reactjs.org/docs/testing.html
source: https://create-react-app.dev/docs/running-tests I think this is the closest to an official statement you will get about the topic you are asking. Fact is, many developers were mistakenly using this ability to test React components the "wrong way". In order to prevent that - the decision was made to move away from Enzyme and promote the "right way" of testing React components. There is also this blog post by the author of testing-library https://kentcdodds.com/blog/testing-implementation-details which I'd say fueled the transition. The blog was originally posted on Feb 8, 2019 which is much before the transiton was made |
Beta Was this translation helpful? Give feedback.
-
Forgive me if this should go in Q&A, but I'm not necessarily looking for help -- I'm more looking for the reasoning behind a decision.
I know that Testing Library is the go-to choice for testing React apps these days. It seems fitting then that it was introduced here in
create-react-app
as the default component testing library.I also noticed that references to Enzyme were taken out of the documentation, further cementing Testing Library as the, well, testing library of choice for CRA.
Was there an official decision behind this transition, or did it "just happen"? I'd like to spread the good word of Testing Library, and I feel like it would be a bit easier if I could point to some blog post (or even commit message) that's basically:
Here's why we migrated from Enzyme to Testing Library...
.Beta Was this translation helpful? Give feedback.
All reactions