Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove fetch-mock #95

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Remove fetch-mock #95

merged 1 commit into from
Sep 18, 2024

Conversation

nicknovitski
Copy link
Member

Using jest to mock at the boundaries of node-fetch directly is simpler, and makes type mismatches between the mock and the real module less likely.

@nicknovitski nicknovitski requested a review from a team as a code owner September 16, 2024 18:24
@nicknovitski nicknovitski requested review from vonovak and removed request for a team September 16, 2024 18:24
Copy link

codecov bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (946e979) to head (6334dac).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #95   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          168       168           
  Branches        32        33    +1     
=========================================
  Hits           168       168           
Flag Coverage Δ
node_18 100.00% <ø> (ø)
node_20 100.00% <ø> (ø)
node_22 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@vonovak vonovak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For mocking network calls, https://mswjs.io/docs/basics/intercepting-requests is the preferred option these days afaik. Just mentioning it for potential future use.

Looks good to me 👍

Using jest to mock at the boundaries of node-fetch directly is simpler,
and makes type mismatches between the mock and the real module less
likely.
@nicknovitski nicknovitski merged commit d8f97b2 into main Sep 18, 2024
5 checks passed
@nicknovitski nicknovitski deleted the rm-fetch-mock branch September 18, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants