{"library":"jest-fetch-mock-fork","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"3.1.2","tags":["javascript","jest","vitest","mock","fetch","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install jest-fetch-mock-fork","imports":["const { enableMocks } = require('jest-fetch-mock-fork')","const { fetchMock } = require('jest-fetch-mock-fork')","const GlobalFetch = require('jest-fetch-mock-fork')"]},{"cmd":"yarn add jest-fetch-mock-fork","imports":[]},{"cmd":"pnpm add jest-fetch-mock-fork","imports":[]}],"homepage":"https://github.com/lukaselmer/jest-fetch-mock#readme","github":"https://github.com/lukaselmer/jest-fetch-mock","docs":null,"changelog":null,"pypi":null,"npm":"jest-fetch-mock-fork","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}