Closed boldurean closed 2 weeks ago
I have reported the same error in the interceptors repository, and I have opened a PR to fix it https://github.com/mswjs/interceptors/pull/669. TL;DR: My findings was, they fixed an error for NextJS, but introduced an error for non NextJS projects.
I have reported the same error in the interceptors repository, and I have opened a PR to fix it mswjs/interceptors#669. TL;DR: My findings was, they fixed an error for NextJS, but introduced an error for non NextJS projects.
I would expect simple test will catch it up :|
Broken for Remix project, as well.
can't use msw on tests due to this issue.
I wish we wouldn't have to do these shenanigans. Having a global property descriptor with a getter that returns undefined is a broken implementation on the framework's side and they mustn't do that. I've already opened a pull request to Next.js to fix that (their issue is different), I didn't expect other frameworks to have this.
Will adjust the interceptor predicate, keeping it sane, hopefully.
This has been fixed in @mswjs/interceptors@0.36.8
(release notes). We can now handle all sorts of property descriptor combinations.
Re-install your dependencies to pull the latest version of this transient dependency to get the fix.
Prerequisites
Environment check
msw
versionNode.js version
20.12.0
Reproduction repository
https://codesandbox.io/p/devbox/lrh2rd
Reproduction steps
npm test
- test passesnpm test
- test failCurrent behavior
Expected behavior
All test work pass as before.