direflow icon indicating copy to clipboard operation
direflow copied to clipboard

Error in Test cases

Open vinitkumargoel opened this issue 4 years ago • 4 comments

Describe the bug
We are trying to mock context and spy on dispatch. But we are not able to do so. dispatch is coming as undefined.

` const dispatch = jest.fn();

jest.spyOn(ReactExports, 'useContext').mockReturnValue(() => { return dispatch }); `

Please suggest how to mock context and test dicpatch.

vinitkumargoel avatar Jun 01 '21 04:06 vinitkumargoel

Hi, @nicocunin @kcmr @johnmcase @andrusch ,

Can you please have a look at this please

vinitkumargoel avatar Jun 02 '21 05:06 vinitkumargoel

Hi, @nicocunin @kcmr @johnmcase @andrusch ,

Can you please have a look at this please

vinitkumargoel avatar Jun 28 '21 16:06 vinitkumargoel

Hi, @nicocunin @kcmr @johnmcase @andrusch ,

Can you please have a look at this please

vinitkumargoel avatar Jul 08 '21 04:07 vinitkumargoel

Hi @vinitkumargoel

I'm not part of the maintainers of this project and only contributed once to it to fix an error that was affecting me. I don't know the code enough to help you with this and I don't have time either. Sorry.

kcmr avatar Jul 08 '21 05:07 kcmr