Skip to content

build(deps-dev): bump jest-fetch-mock from 3.0.3 to 3.2.0 in the jest group#223

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/jest-7f04da880c
Open

build(deps-dev): bump jest-fetch-mock from 3.0.3 to 3.2.0 in the jest group#223
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/jest-7f04da880c

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 13, 2026

Copy link
Copy Markdown
Contributor

Bumps the jest group with 1 update: jest-fetch-mock.

Updates jest-fetch-mock from 3.0.3 to 3.2.0

Release notes

Sourced from jest-fetch-mock's releases.

3.2.0 — the revival release

The first release since 3.0.3 (March 2020). Everything merged to master in the intervening years ships here, plus a round of new fixes. The project is under active maintenance again: CI gates every PR (unit matrix on Node 18–24 plus six consumer integration fixtures run against the packed tarball), and releases publish via npm trusted publishing with provenance.

Added

  • Pass a Response object directly to mockResponse/mockResponseOnce/once/mockResponses and the conditional mocks — including binary (Buffer) bodies (#223, thanks @​alexkolson). Response functions may also return a Response (sync or async) and its status/headers are preserved.
  • URL objects and other stringifiables accepted as fetch input (#193)
  • Synchronous response functions — no need to return a promise (#145)
  • Mock redirected responses via the counter init param (#168)
  • engines field declaring the Node ≥ 12 floor

Fixed

  • TypeScript definitions work with modern @types/node again — no more NodeJS.Global import (#184, #201, #248)
  • fetch() with an already-aborted signal rejects (per the fetch spec) instead of throwing synchronously, so it is catchable (#237)
  • fetch.isMocking returns a plain boolean after resetMocks() (#183)
  • DOMException polyfilled in Node environments — mockAbort works under jest-environment-node (#159)
  • dontMockIf predicates now receive the request method/headers, matching doMockIf
  • Conditional mock callbacks may return synchronously in TypeScript (#220)

Changed

  • TypeScript: fetch's input argument is required, matching the DOM signature (#206, #207) — if your code calls fetch() with no arguments, add a URL
  • Tests asserting the old synchronous abort throw should switch from expect(() => fetch(...)).toThrow() to await expect(fetch(...)).rejects.toThrow()
  • cross-fetch floor raised to ^3.1.8, closing the vulnerable-transitive-node-fetch report (#228, #249)
  • promise-polyfill dependency removed (dead code on Node ≥ 12)
  • The npm tarball no longer ships tooling files (3.0.3 even shipped coverage reports)

Docs

  • README overhauled: a prominent warning for the resetMocks: true footgun (#81, #78, #104, #202), modern TypeScript setup, Node native-fetch notes, and a recipes section for the perennial questions. CHANGELOG added.

What's next

v4.0.0 will rearchitect around the environment's native fetch (no more replacing global.Response/Request/Headers — the root cause of #218 and the Node 18+ issue cluster), with dual CJS+ESM and self-contained types. It will soak on the next dist-tag before release. Using Vitest? See vitest-fetch-mock.

3.2.0-beta.2

Release candidate for 3.2.0 — the first release since 3.0.3 (March 2020). Please help test: npm install -D jest-fetch-mock@next. Supersedes 3.2.0-beta.1.

Added

  • Pass a Response object directly to mockResponse/mockResponseOnce/once/mockResponses and the conditional mocks — including binary (Buffer) bodies (#223, thanks @​alexkolson). Response functions may also return a Response.
  • URL objects and other stringifiables accepted as fetch input (#193)
  • Synchronous response functions — no need to return a promise (#145)
  • Mock redirected responses via the counter init param (#168)
  • engines field declaring the Node ≥ 12 floor

Fixed

  • TypeScript definitions work with modern @types/node again — no more NodeJS.Global import (#184, #201, #248)
  • fetch() with an already-aborted signal rejects (per the fetch spec) instead of throwing synchronously, so it is catchable (#237)
  • fetch.isMocking returns a plain boolean after resetMocks() (#183)
  • DOMException polyfilled in Node environments — mockAbort works under jest-environment-node (#159)
  • dontMockIf predicates now receive the request method/headers, matching doMockIf
  • Conditional mock callbacks may return synchronously in TypeScript (#220)

Changed

... (truncated)

Changelog

Sourced from jest-fetch-mock's changelog.

3.2.0 (2026-07-08)

First release since 3.0.3 (March 2020). Everything merged to master in the intervening years ships in this release, plus a round of new fixes. Version 3.1.0 was tagged in 2024 but never published to npm; its contents are included here.

Added

  • Pass a Response object directly to mockResponse, mockResponseOnce, once, mockResponses and the conditional mocking functions — including responses with binary (Buffer) bodies (#223, thanks [@​alexkolson])
  • Response functions can return a Response object (sync or async)
  • URL objects (and anything else with a toString) accepted as fetch input (#193)
  • Mock redirected responses via the counter param in response init (#168)
  • Response functions may be synchronous — no need to return a promise (#145)
  • engines field declaring the Node >= 12 floor (required by the domexception dependency)

Fixed

  • TypeScript definitions no longer import NodeJS.Global, which was removed from @types/node — types now work with modern @types/node/TypeScript setups (#184, #201, #248)
  • dontMockIf/dontMockOnceIf predicates now receive the fully-constructed Request (method, headers from the init argument), matching doMockIf behavior
  • fetch() called with an already-aborted signal now rejects (as per the fetch spec) instead of throwing synchronously, so it can be caught with .catch() (#237)
  • fetch.isMocking returns a plain boolean again after resetMocks() (#183)
  • DOMException is polyfilled in Node environments, fixing mockAbort under jest-environment-node (#159)
  • TypeScript: mockIf/doMockIf callbacks may return synchronously (#220)

Changed

  • TypeScript: fetch's input argument is now required, matching the DOM signature (#206, #207)
  • cross-fetch floor raised to ^3.1.8 (security fixes in transitive node-fetch) (#228, #249)
  • The npm tarball no longer ships tooling configs, workflow files, or type-test files
  • npm publishing now happens via GitHub Actions trusted publishing with provenance
  • The promise-polyfill dependency was removed — unreachable code on Node ≥ 12, which the engines field declares

Internal

  • Test suite grown from 64 to 98 tests with coverage thresholds enforced on every run (99% statements / 98% branches)
  • New integration/ suite: six consumer fixtures (jsdom, React + Testing Library, TypeScript strict, node native-fetch host, Jest 30, and a real-HTTP-server passthrough e2e) run against the packed tarball in CI and gate every release
  • Implementation compressed (~10% smaller) with no API changes

#145: jefflau/jest-fetch-mock#145 #159: jefflau/jest-fetch-mock#159 #168: jefflau/jest-fetch-mock#168 #183: jefflau/jest-fetch-mock#183 #184: jefflau/jest-fetch-mock#184 #193: jefflau/jest-fetch-mock#193 #201: jefflau/jest-fetch-mock#201 #206: jefflau/jest-fetch-mock#206 #207: jefflau/jest-fetch-mock#207 #220: jefflau/jest-fetch-mock#220 #223: jefflau/jest-fetch-mock#223 #228: jefflau/jest-fetch-mock#228 #237: jefflau/jest-fetch-mock#237 #248: jefflau/jest-fetch-mock#248

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for jest-fetch-mock since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Bumps the jest group with 1 update: [jest-fetch-mock](https://github.com/jefflau/jest-fetch-mock).


Updates `jest-fetch-mock` from 3.0.3 to 3.2.0
- [Release notes](https://github.com/jefflau/jest-fetch-mock/releases)
- [Changelog](https://github.com/jefflau/jest-fetch-mock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jefflau/jest-fetch-mock/commits/v3.2.0)

---
updated-dependencies:
- dependency-name: jest-fetch-mock
  dependency-version: 3.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: jest
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jul 13, 2026
@dependabot
dependabot Bot requested review from a team as code owners July 13, 2026 06:52
@dependabot dependabot Bot added the javascript Pull requests that update javascript code label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants