unistore icon indicating copy to clipboard operation
unistore copied to clipboard

How to use Unistore action in JEST for shallow testing?

Open MdAyman7 opened this issue 6 years ago • 2 comments

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?

MdAyman7 avatar Nov 27 '19 12:11 MdAyman7

I was facing the same error message. To solve it, I wrapped the Component around Provider. mount(<Provider store={store}><Component /></Provider>)

ashnehete avatar Jan 30 '20 11:01 ashnehete

Unfortunately shallow(<Provider store={store}><ConnectionBox /></Provider>).debug() produces <i /> and I am not sure what I can do with it.

zgoda avatar Mar 17 '21 22:03 zgoda