{"library":"meiro-jest-fetch-mock","type":"library","category":null,"description":"Mock for fetch calls in Jest tests. v3.0.4 enables mocking global fetch (including cross-fetch polyfill) with Jest's built-in mock functions. It provides a simple API with mockResponse, mockResponses, mockReject, and mockOnce methods. Supports TypeScript types, conditional mocking by URL, and resetting state between tests. Lightweight alternative to MSW or nock for unit tests.","language":"javascript","status":"active","version":"3.0.4","tags":["javascript","jest","mock","fetch","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install meiro-jest-fetch-mock","imports":["import { enableMocks } from 'jest-fetch-mock'","// After enableMocks(), fetchMock is available globally\nfetchMock.mockResponse('ok')","import type { GlobalFetchMock } from 'jest-fetch-mock'"]},{"cmd":"yarn add meiro-jest-fetch-mock","imports":[]},{"cmd":"pnpm add meiro-jest-fetch-mock","imports":[]}],"homepage":"https://github.com/jefflau/jest-fetch-mock#readme","github":"https://github.com/jefflau/jest-fetch-mock","docs":null,"changelog":null,"pypi":null,"npm":"meiro-jest-fetch-mock","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}