Testing custom hook: Invariant Violation: could not find react-redux context value; please ensure the component is wrapped in a
The react hooks testing library docs go more into depth on this. However, what we essentially are missing is the provider which we can obtain by creating a wrapper. First we declare a component which will be our provider: import { Provider } from ‘react-redux’ const ReduxProvider = ({ children, reduxStore }) => ( <Provider … Read more