Open Afsoon opened 1 day ago
Hi, @Afsoon. Thanks for reporting this.
Let's discuss it first. Just checking the getter not being there isn't enough—the property descriptor can have a value
and no get
, and that's a valid property that must return true
. Will look at your pull request in more detail once I have a moment (thanks for opening that btw!).
Hello
Our current dependanbot PR is failing with the latest MSW version, after debugging and tracking changes in the repository I have conclude the following:
globalThis.WebSocket !== undefined
, but the new guard function doesn't check it anymore https://github.com/mswjs/interceptors/blob/7aff641f8eddbbe53d5d23ddc4b8295e708dcdc0/src/utils/hasConfigurableGlobal.ts#L5-19TypeError: Cannot create proxy with a non-object as target or handler
Our setup is Vitest + Happy-DOM + Remix, I have tested prior version of MSW, and it didn't have this problem.
I'm not 100% sure of the fix, but I think it's a missing a check that is:
If it's the fix, I can create a PR with the test.