npm jest-fetch-mock 4.1.0

6 hours ago

Small follow-up to 4.0.0:

Added

  • fetchMock.Response.redirect(), .error() and — on native fetch — .json() statics are exposed through the Response wrapper (#191): fetchMock.mockResponseOnce(fetchMock.Response.redirect('https://moved.test/', 302))

Docs

  • README fully aligned with the 4.0 architecture (native-primitives intro, setupFilesAfterEnv one-liner as the recommended setup, rewritten resetMocks note around the auto-re-arm, self-contained TypeScript notes, redirected mocking documented for every environment, realFetch in the conditional-mocking example) — this is the version shown on the npm package page

Also today: the issue tracker was cleared — every open issue received a verdict and a reply. Remaining open by intent: #171 (stacking mockIf matchers, the flagship 4.x feature request — design input welcome) and #233 (awaiting reproduction). CHANGELOG

Don't miss a new jest-fetch-mock release

NewReleases is sending notifications on new releases.