DEV Community

Discussion on: Enzyme is dead. Now what?

Collapse
 
stretch0 profile image
Andrew McCallum

RTL is by no means an Enzyme drop-in replacement, so having a completely fresh mindset will help you getting the most of it.

You make a good point. RTL is more of an integration testing library where as Enzyme has the ability to unit test components. This move from unit to integration test focus is a pretty big change for some applications.

Collapse
 
marabesi profile image
Marabesi

Even though I see how the thinking behind integration x unit test is, I would recommend to watch Mario's talk on fragile tests (blog.devgenius.io/tdd-conference-2...).

The mindset of unit x integration around RTL is something that comes up often, and, it's possible to test a single component with RTL as well. The point is, this is not the philosophy of the library (testing-library.com/docs/guiding-p...).

In this sense, what I understand is: unit does not mean 1-1 (one test one component) rather, one behavior that you want to test.