I am updating a unit test in jest and enzyme on a React component and running into an issue.
I recently added a child component (that itself is connected to Redux) to the parent component that is using enzyme's ‘mount’ and the unit test has failed.
Note the project compiles and works fine.
This is the error given on the CLI:
Invariant Violation: Could not find "store" in the context of "Connect("ChildComponent Name Here")". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to Connect("ChildComponent Name Here") in connect options.
I have confirmed that the Redux connected child component is causing the issue.
Is it possible to mock the store of a child component in this instance?