Hi,
I have a CI to upgrade dependencies and I'm having this error in my tests when trying to upgrade to react-redux to v6.0.0
TypeError: Cannot read property 'subscribe' of undefined
> 20 | const { container } = render(mockComponent(Step1, { initialProps }));
| ^
It's something related to this library or I have to open bug in reac-redux github?
Thanks
To me, it looks related to your component. What does mockComponent render?
My guess is that your component expects some sort of context that you need to provide.
Yes, now I see that it's also breaking all my project. I'm gonna try to fix it.
My guess is that you have to do the render this way:
render(
<Provider store={store}>
<MyComponent />
</Provider>
)
Most helpful comment
My guess is that you have to do the render this way: