You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to use Unistore action in JEST for shallow testing? #181
I am facing an error while testing my react app from JEST. It shows an error as "TypeError: Cannot read property 'action' of undefined".
Can I know how do I solve this error?
Activity
[-]How to test using Jest with Unistore?[/-][+]How to use Unistore action in JEST for shallow testing?[/+]ashnehete commentedon Jan 30, 2020
I was facing the same error message. To solve it, I wrapped the Component around Provider.
mount(<Provider store={store}><Component /></Provider>)zgoda commentedon Mar 17, 2021
Unfortunately
shallow(<Provider store={store}><ConnectionBox /></Provider>).debug()produces<i />and I am not sure what I can do with it.