IanVS / vitest-fetch-mock

Vitest mock for fetch, forked from jest-fetch-mock
MIT License
68 stars 9 forks source link

feat: allow passing null or undefined as response body #27

Closed dirkluijk closed 1 month ago

dirkluijk commented 1 month ago

Fixes https://github.com/IanVS/vitest-fetch-mock/issues/25

IanVS commented 1 month ago

I can also construct a Response in Chrome using new Response(undefined, {status: 204}), should that also be allowed here?

dirkluijk commented 1 month ago

Good idea, fixed!

IanVS commented 1 month ago

Mind handling the conflict here, @dirkluijk, and then I will merge and release 0.4.1?

dirkluijk commented 1 month ago

Done!