Preparing for system design interviews?  Try bugzed.com →

Jest Fetch Mock (Fork)

JSON →
library 3.1.2 ·javascript
verified Jun 7, 2026

A lightweight library for mocking fetch requests in Jest and Vitest test environments. Version 3.1.2 is current. It provides a global fetchMock object with methods like mockResponseOnce, mockResponses, and mockReject to simulate different HTTP responses and errors. Works with cross-fetch polyfill, supports TypeScript, and is compatible with both Node.js and browser-like runtimes. Compared to alternatives like nock, it integrates directly with Jest's mocking system, offering a simpler API for common use cases. Note: This is a fork of the original jest-fetch-mock, which is unmaintained and not published to npm with latest fixes.

total hits 12
actors 3 distinct systems
last hit 17d ago AhrefsBot
GPTBot
3
Amazonbot
3
Humans
5

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇮🇩 Indonesia