MSW: migrate login handlers - #1184
Conversation
|
Deployment previews on netlify for branch
|
dati18
left a comment
There was a problem hiding this comment.
I think you did a good job on this. But I want to point out a few inconsistencies (a bit nitpicking)
MSW v2 has HttpResponse helpers, and I believe it was designed around them. For example:
HttpResponse.json()new HttpResponse(null, { status: 204 })
Official v2 doc: https://mswjs.io/docs/api/http
Thanks! Yes, I'm aware of the msw's |
continuation of #1114
contains some fixes to the prior work and adjustments to the current codebase
This patch starts the migration from the broken 1.x MSW configuration to a 2.x one.
It adjusts our browser mocks to use the new msw/browser using the Fetch API (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
In the new handlers it moves over just login functionality as well as the querying for user wikis and missing policies, leaving the remaining handler migration to future work.
Co-authored-by: rosalieper 15235452+rosalieper@users.noreply.github.com
Co-authored-by: outdooracorn 43674967+outdooracorn@users.noreply.github.com
Co-authored-by: tarrow 7353563+tarrow@users.noreply.github.com
https://phabricator.wikimedia.org/T436360