How to mock getState() in flux using jest


I have some problem with mocking my stores in flux. I’m using jest and react testing library .
I need to add some data as initialStoreData
how can I mock getState()?
I have no idea to do that!!!

Source: React – Stack Overflow

October 4, 2021
Category : News
Tags: getstate | jestjs | mocking | reactjs | reactjs-flux

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.