react-suspense-fetch icon indicating copy to clipboard operation
react-suspense-fetch copied to clipboard

feature: testing support / mocking

Open mdjastrzebski opened this issue 1 year ago • 1 comments

I am looking for any information how I could use this library in integration tests using Jest & React Testing Library. My goal is to be able to test screen using this library while avoiding real network calls but rather serving static data, e.g. from JSON.

mdjastrzebski avatar Aug 03 '22 19:08 mdjastrzebski

How about mocking the fetch function that you pass to createFetchStore?

dai-shi avatar Aug 03 '22 23:08 dai-shi