Is Enzyme still recommended for testing in preact? #3944
Replies: 1 comment
-
That is not necessarily a recommendation, no, just a presentation of a valid option. We do have a page documenting testing library if you prefer that instead. @robertknight wrote a pretty comprehensive comment on this a while back: #3540 (comment) TLDR: They are the two biggest libraries in the space offering valid tradeoffs and testing strategies between them. Preact's Enzyme adapter doesn't suffer from nearly the same amount of issues that lead to Enzyme maintainers more or less calling it quits in regard to supporting future React versions. Edit: For what it's worth, that author of that blog post is not an Enzyme contributor -- he wrote a separate package for React 17 support and that's about it. Support for future React versions can still land, they're not a source of authority there. |
Beta Was this translation helpful? Give feedback.
-
Came across this post from one of the enzyme contributors - https://dev.to/wojtekmaj/enzyme-is-dead-now-what-ekl. He says enzyme is dead and doesn't support react18 and asks users to migrate to react testing library. But preacts recommends you use enzyme for unit testing - https://preactjs.com/guide/v10/unit-testing-with-enzyme/
Confused about which testing library to use for the preact widget I am working on. Would anyone please clarify this?
Beta Was this translation helpful? Give feedback.
All reactions