instanceof filtering with multiple msw versions #2632
meesvandongen
started this conversation in
General
Replies: 1 comment
-
|
Hi, @meesvandongen. Thanks for raising this. Perhaps we can help with this kind of issues as well by setting a loose peer dependency version on packages like A pull request would be welcome here! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have recently come across an issue where we had multiple versions of MSW in a monorepo:
@msw/playwright@msw/playwrightdoes this at some point:If there are multiple RequestHandler declarations due to different versions being resolved, this check will fail even if the handler could be used as a request handler.
The behavior then is that it seems like msw is not intercepting anything; in my case this resulted in responses with status code 500 and an empty body.
I don't think this is necessarily a problem on
mswside; this discussion is simply to document the behavior. Users of monorepo's should probably use something (e.g. PNPM Catalogs) to prevent this type of issue.Beta Was this translation helpful? Give feedback.
All reactions