task: upgrade jest and nock to support native fetch - #18724
Closed
toufali wants to merge 3 commits into
Closed
Conversation
toufali
force-pushed
the
task/fix-native-fetch-tests
branch
from
April 15, 2025 16:17
914e658 to
8447804
Compare
4 tasks
toufali
force-pushed
the
task/fix-native-fetch-tests
branch
from
April 15, 2025 19:52
8447804 to
a7f8c72
Compare
Member
Author
|
Closing this in favor of #18698 . Nock was not built for native fetch. A recent release suggests it can work, but after upgrading and going down that path I found too many work-arounds were needed, including importing text-encoder/decoder for all nock test files, and installing yet another dependency, @mswjs/interceptors. Since one of the original goals was to remove dependencies, I decided on a different approach, replacing nock with fetch-mock (which is already used/installed in our codebase). Since fetch-mock doesn't work with Axios (and vice-versa) I'll complete this replacement together with native fetch in #18698 |
5 tasks
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.
Because
Tests fail when using native Fetch API, blocking our migration away from Axios
This pull request
Upgrades Jest and Nock to versions that are known to support the native Fetch API
Issue that this pull request solves
Closes: FXA-11503
Checklist
Put an
xin the boxes that apply