-
Notifications
You must be signed in to change notification settings - Fork 28.4k
fix: with-msw outdated example related to issue 68521 #78853
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: canary
Are you sure you want to change the base?
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
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.
Please also add a working Codesandbox or at least a demo video, so we know it's been tested and successfully works locally.
Perhaps show a before/after as well.
Rest of the review is mostly linting and formatting stuff.
I've attached a screen recording and a link to a codesandbox poc. |
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.
Great job on the repro. Thanks. Small nit
import { handlers } from "./handlers"; | ||
|
||
export const worker = setupWorker(...handlers); | ||
export const worker = setupWorker(...handlers); |
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.
I still don't know what changed here.
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.
could be that the setupWorker was previously imported from "msw" and now it's imported from "msw/browser" so its counted as a change.
Fix: 68521 Updating outdated with-msw example
The with-msw is outdated and doesn't work with the latest msw version.
What?
The with-msw example is outdated and does not work with the latest msw version.
Why?
How?
Codesandbox
https://codesandbox.io/p/sandbox/github/codesandbox/sandbox-templates/tree/main/create-t3-app
Media
localhost_3000.-.Google.Chrome.2025-05-08.09-50-04.mp4