You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you so much for writing this, it is amazing. However, I'm having trouble getting it to work exactly how I want. Here are some of the Issues:
global.d.ts doesn't work, IDE complains that fetch doesn't have this function
returning Promise.reject inside mockResponse does not result in a failed request it just returns the content but res.ok is still true
The text was updated successfully, but these errors were encountered:
I'm honestly not too familiar with this project, I mostly just adjusted it to work with vitest. I'd be happy to review a pull request though if you or someone else can solve the issues. You could check if https://github.com/jefflau/jest-fetch-mock has the issues as well, and maybe an issue is open there?
Just started looking into this package so bare with me here:
@leonheess I believe the issue here is that you can configure Jest to be smart enough that you can use fetch in your tests buit it's actually calling the declared const fetchMock (see their docs here).
I don't believe such an option exists on Vitest's config currently so for now you if you use fetchMock in your tests you'll get the same result.
First of all, thank you so much for writing this, it is amazing. However, I'm having trouble getting it to work exactly how I want. Here are some of the Issues:
Promise.reject
insidemockResponse
does not result in a failed request it just returns the content butres.ok
is still trueThe text was updated successfully, but these errors were encountered: