You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**What about enzyme is "bloated with complexity and features" and "encourage poor testing
245
+
practices"**
246
+
247
+
Most of the damaging features have to do with encouraging testing implementation
248
+
details. Primarily, these are
249
+
[shallow rendering](http://airbnb.io/enzyme/docs/api/shallow.html), APIs which
250
+
allow selecting rendered elements by component constructors, and APIs which
251
+
allow you to get and interact with component instances (and their
252
+
state/properties) (most of enzyme's wrapper APIs allow this).
253
+
254
+
The guiding principle for this library is:
255
+
256
+
> The less your tests resemble the way your software is used, the less confidence they can give you. - [17 Feb 2018](https://twitter.com/kentcdodds/status/965052178267176960)
257
+
258
+
Because users can't directly interact with your app's component instances,
259
+
assert on their internal state or what components they render, or call their
260
+
internal methods, doing those things in your tests reduce the confidence they're
261
+
able to give you.
262
+
263
+
That's not to say that there's never a use case for doing those things, so they
264
+
should be possible to accomplish, just not the default and natural way to test
0 commit comments