Closed jiri-prokop-pb closed 1 month ago
This has been released in v0.0.6!
Make sure to always update to the latest version (npm i jest-fixed-jsdom@latest
) to get the newest features and bug fixes.
Predictable release automation by @ossjs/release.
While migrating to MSW v2 we had strange, seemingly unrelated, failure in one of our tests.
After some debugging it turned out it's related to
jest-fixed-dom
replacingURL
with native one. I don't know why exactly it's broken but I provided a test and you can check this on your own, if you are interested.Basically, if you mock methods on
URLSearchParams
and then you access it throughURL.searchParams
, the mock won't work. By just simply addingthis.global.URLSearchParams = URLSearchParams
it will start working.