-
Notifications
You must be signed in to change notification settings - Fork 24
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
playwright-msw is broken after recent update to msw 2.6.0 #104
Comments
I have analyzed the problem further and it seems to be the following three new lines in if (!(handler instanceof RequestHandler)) {
continue
} Somehow the handlers created by The question is what to do about this issue. I am not fluent enough in this repo to easily fix this. |
I have confirmed the issue is due to The issue can be solved by providing an |
We also see flaky tests on msw 2.4.4 and playwright-msw 3.0.1 where our handlers are not being registered and they go call the "live" endpoint underneath. We have one specs file with two Any help I can provide too lmk, @rolule did you work on the PR yet for esm support? |
Thank you, though I think the problem is that the package does not seem to be maintained anymore. @valendres please confirm so we could create a fork to fix the problem. |
Looks related, new version of msw might fix? |
Newest version of MSW did not fix this for me. It looks like we will need to patch |
Hi, thank you for this amazing package. Unfortunately, the latest
2.6.0
release of msw breaks it completely, as the handlers do not get registered anymore.To reproduce this, I built a minimal example in CodeSandbox: https://codesandbox.io/p/devbox/cocky-cerf-cwj96y
When you are on
[email protected]
, the single test works perfectly fine when runningnpx playwright test
:Now run
npm install [email protected]
(you might have to fork the CodeSandbox to make changes) and runnpx playwright test
again:=> it is obvious that our single handler (in
playwright/test.ts
) did not register properly and the test timed out.I hope this issue can be fixed soon, as we rely on it for our Playwright tests. Thank you!
The text was updated successfully, but these errors were encountered: