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
I have a unit test I'm converting over to use this library. Since the method I'm testing reads from Response.body like a stream (which follows the fetch API docs), the previous version of the unit test passed a Readable.from(... abitrary data ...). However, this lib only will allow me to pass a string.
I was able to work around it by calling fetchMock.mockResponse(Readable.from( ... ) as any) but it would be nice if I didn't have to cast.
The text was updated successfully, but these errors were encountered:
I have a unit test I'm converting over to use this library. Since the method I'm testing reads from Response.body like a stream (which follows the fetch API docs), the previous version of the unit test passed a
Readable.from(... abitrary data ...)
. However, this lib only will allow me to pass a string.I was able to work around it by calling
fetchMock.mockResponse(Readable.from( ... ) as any)
but it would be nice if I didn't have to cast.The text was updated successfully, but these errors were encountered: