react-native-fetch-polyfill icon indicating copy to clipboard operation
react-native-fetch-polyfill copied to clipboard

Unable to mock this module

Open gourav-singhal opened this issue 5 years ago • 2 comments

Can you provide a mock implementation of this module for jest testing?

gourav-singhal avatar May 31 '19 13:05 gourav-singhal

@zachdunn @samdunn Can you help me out with this? Tried this but it is not working

jest.mock('react-native-fetch-polyfill', () => { fetch: jest.fn().mockImplementation( () => Promise.resolve({ json: () => Promise.resolve(JSON.parse(body)) }), ), })

gourav-singhal avatar Jun 03 '19 05:06 gourav-singhal

Seems like this library is not maintained anymore

gourav-singhal avatar Jun 05 '19 06:06 gourav-singhal