jest-fetch-mock icon indicating copy to clipboard operation
jest-fetch-mock copied to clipboard

Jest mock for fetch

Results 88 jest-fetch-mock issues
Sort by recently updated
recently updated
newest added

I'm using Create-React-App. After following the docs and adding: ``` "jest": { "setupTestFrameworkScriptFile": "/src/setupTests.js" } ``` I received the error message: ``` We detected setupTestFrameworkScriptFile in your package.json. Remove it...

Broke package with a merge conflict. Should force run tests prior to deployment

Hi, I'm having trouble finding a way to make assertions after the `fetch` resolves. My case is that I have a component which makes a `fetch` when a button is...

Can anyone help me out about the error I am getting while testing "self.body is not a function" This is my code `it('creates GET_PROPERTY_DETAILS_REQUEST when getting details', () => {...

[Headers.entries](https://developer.mozilla.org/en-US/docs/Web/API/Headers/entries) in MDN.

https://github.com/jefflau/jest-fetch-mock/pull/72#issuecomment-395898878

Can't use the lib for testing FormData bodies it seems - getting `FormData is not defined`.

● Test suite failed to run ``` SyntaxError: Unexpected token [ at transformAndBuildScript (../node_modules/jest-runtime/build/transform.js:284:10) at Object. (setupTests.js:1:809) ``` **package.json** ``` { "name": "super-admin-skeleton", "version": "1.0.0", "description": "ECP skeleton for React/Redux...

Cross-fetch before version 3.1.5 uses node-fetch version 2.6.1, which has security vulnerability. In order to address this we need to update cross-fetch to version 3.1.8, or if it is possible...

I just encountered this error. ```ts import fetchMock from 'jest-fetch-mock'; fetchMock.mock... // -------^ // Property 'mock' does not exist on type 'FetchMock' ``` The issue is this ![image](https://github.com/jefflau/jest-fetch-mock/assets/1266245/e46f335d-90a6-4956-9be8-95472d1b9b8f) I'm using...