2 ms·
Enzyme is for writing integration tests rather than unit tests - a component is a whole bunch of different things interacting with the DOM. You can't really bre
by onion2k 8y ago
Enzyme is for writing integration tests rather than unit tests - a component is a whole bunch of different things interacting with the DOM. You can't really break that down in to individual units of code, so you can't unit test it.
If you have complex logic in a component that needs unit tests you should probably pull that code out in to its own class and test that separately.