chore(deps): update dependency jest-fetch-mock to v3.2.0#113
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.0.3→3.2.0Release Notes
jefflau/jest-fetch-mock (jest-fetch-mock)
v3.2.0First 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
Responseobject directly tomockResponse,mockResponseOnce,once,mockResponsesand the conditional mocking functions — including responses with binary (Buffer) bodies (#223, thanks @alexkolson)Responseobject (sync or async)URLobjects (and anything else with atoString) accepted as fetch input (#193)redirectedresponses via thecounterparam in response init (#168)enginesfield declaring the Node >= 12 floor (required by thedomexceptiondependency)Fixed
NodeJS.Global, which was removed from@types/node— types now work with modern@types/node/TypeScript setups (#184, #201, #248)dontMockIf/dontMockOnceIfpredicates now receive the fully-constructedRequest(method, headers from the init argument), matchingdoMockIfbehaviorfetch()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.isMockingreturns a plain boolean again afterresetMocks()(#183)DOMExceptionis polyfilled in Node environments, fixingmockAbortunderjest-environment-node(#159)mockIf/doMockIfcallbacks may return synchronously (#220)Changed
inputargument is now required, matching the DOM signature (#206, #207)cross-fetchfloor raised to ^3.1.8 (security fixes in transitivenode-fetch) (#228, #249)promise-polyfilldependency was removed — unreachable code on Node ≥ 12, which theenginesfield declaresInternal
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 releaseConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.