Skip to content

4.1.0

Latest

Choose a tag to compare

@jefflau jefflau released this 08 Jul 12:52
e938f7b

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