-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[Demo] Migrate from fetch-mock
to msw
#10844
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
base: master
Are you sure you want to change the base?
Conversation
const data = generateData(); | ||
const restServer = JsonGraphqlServer({ data }); | ||
const handler = restServer.getHandler(); | ||
const handlerWithLogs = (url: string, opts: any) => |
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.
We don't need to keep it. If we don't pass quiet: true
to worker.start
, it will automatically displays us the right logs 👍
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.
Good work, except you probably didn't test the graphql demo which is broken
Problem
fetch-mock
brings us back some vulnerabilities.Solution
Change it for MSW
To Do
Additional Checks
master
for a bugfix or a documentation fix, ornext
for a feature[ ] The PR includes unit tests (if not possible, describe why)[ ] The PR includes one or several stories (if not possible, describe why)[ ] The documentation is up to date