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

Replace jest mocks with Mock Service Worker #98

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

nicknovitski
Copy link
Member

@nicknovitski nicknovitski commented Sep 25, 2024

This decouples the tests from node-fetch, which makes it easier to replace. (e: except with undici, I just confirmed that, mswjs/msw#2165)

I removed assertions against the sent requests, and changed a few other tests: the test server, like the real server, will error if passed useFcmV1=false, so the test for that client option needs to expect that error.

@nicknovitski nicknovitski marked this pull request as ready for review September 25, 2024 00:23
@nicknovitski nicknovitski requested a review from a team as a code owner September 25, 2024 00:23
@nicknovitski nicknovitski requested review from douglowder and removed request for a team September 25, 2024 00:23
@douglowder douglowder merged commit b25ed2b into main Dec 20, 2024
3 checks passed
@douglowder douglowder deleted the test-with-msw branch December 20, 2024 23:17
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ab85c94) to head (dfccfea).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #98   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          168       168           
  Branches        32        32           
=========================================
  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.

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