unistore
unistore copied to clipboard
How to use Unistore action in JEST for shallow testing?
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?
I was facing the same error message. To solve it, I wrapped the Component around Provider.
mount(<Provider store={store}><Component /></Provider>)
Unfortunately shallow(<Provider store={store}><ConnectionBox /></Provider>).debug() produces <i /> and I am not sure what I can do with it.