StackOverflow - unit-testing, reactjs, enzyme, airbnb-js-styleguide

Why does shallow Rendering not work as expected?

Shallow rendering won't go as deep as you want in this case because of your div nesting. http://airbnb.io/enzyme/docs/api/shallow.html Either use mount or use .dive() API to go one level further. See the example in the enzyme docs: http://airbnb.io/enzyme/docs/api/ShallowWrapper/dive.html

Was this helpful?

Have a different question?

Can't find the answer you're looking for? Submit your own question to our community.

🛎️ Get Weekly OTA Fixes

New answers, vendor issues, and updates — straight to your inbox.