-
Notifications
You must be signed in to change notification settings - Fork 53
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
[WIP] Manual bump of MSW from 1.2.3 to 2.0.13 #1481
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1481 +/- ##
===========================================
- Coverage 77.69% 19.03% -58.66%
===========================================
Files 69 69
Lines 2035 2028 -7
Branches 560 557 -3
===========================================
- Hits 1581 386 -1195
- Misses 413 1472 +1059
- Partials 41 170 +129
... and 43 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days. |
This updates the version of MSW. Upon `npm ci` the file `mockServiceWorker.js` is automatically updated as well.
This migrates the previously used handlers and fixtures according to following guide: https://mswjs.io/docs/migrations/1.x-to-2.x
9e70186
to
d5ee829
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @regexowl !
we just migrated to msw 2.x last week RHEnVision/provisioning-frontend#370
you can have a look :)
msw 2.x requires node version 18+
We had some similar issues with tests and jsdom test env, make sure that you have all the required polyfills, in the msw
official migration guide the polyfills includes packages from undici
@amirfefer Thank you! ✨ I will check it out 👀 |
This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days. |
This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days. |
I've opened a more up-to-date WIP: #1831 |
Started working on the bump several days ago. Wasn't able to make it work as there's some problem with the testing environment setup and the render functions do not seem to be rendering.
I plan to take another look at it later, but wanted to create a draft in case anyone else wanted to check the migration as well.
The handlers and fixtures were updated as per guide: https://mswjs.io/docs/migrations/1.x-to-2.x