Top "Fetch-mock" questions

fetch-mock allows mocking HTTP requests made using fetch, or any one of the many libraries imitating its api such as isomorphic-fetch, node-fetch and fetch-ponyfill.

fetch-mock mocking all requests

I'm using fetch-mock in order to mock some requests to the server. This is where all the requests are made: …

reactjs webpack mocking fetch fetch-mock
How to setup fetch-mock with node-fetch, supertest and typescript

I am trying to add some jest tests to my node typescipt project. I would like to use supertest to …

node.js typescript unit-testing jestjs fetch-mock
How to mock several gets in fetch-mock?

I'm testing my react components and I want to mock several get operations. What I want to do is something …

unit-testing mocking fetch fetch-mock
How do I fetch-mock a post request with a payload

I am using the wheresrhys fetch-mock npm module to run functional testing in my app. I would like to mock …

unit-testing fetch functional-testing fetch-mock
fetch-mock does not mock my fetch

here is the code snippet: var fetch = require("node-fetch"); var fetchMock = require("fetch-mock"); function setupMockBlockChainExplorer() { fetchMock.mock("https://cardanoexplorer.com/…

node.js fetch fetch-mock
fetch-mock: No fallback response defined for POST

All my GET requests are going through but POST ones fail. This happens when I update fetch-mock from 7.3.0 to 7.3.1 or …

javascript api unit-testing jestjs fetch-mock