mardi 22 août 2017

Testing a react component with a connected child component using enzyme mount

I'm testing a react component using enzyme mount (because i'm testing it's lifecycle methods). My problem is that my component has a redux connected child component, which is giving me the error:

Invariant Violation: Could not find "store" in either the context or props of "Connect(Popup)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(Popup)

How can I get around this?
Thanks!
Uri

Aucun commentaire:

Enregistrer un commentaire