Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: fetch-mock Response.body is not always a stream #610

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fluggo
Copy link

@fluggo fluggo commented May 15, 2021

The WhatWG fetch spec requires that Body.body (and therefore Response.body) is always a readable stream, but it doesn't always happen that way in Node. This seems to be because ResponseBuilder tries to fetch the stream module from fetchMock, but it looks in the wrong place.

Fixes #609.

@fluggo
Copy link
Author

fluggo commented May 15, 2021

The CI check that shows failure if code is similar in test cases is not fun.

Brian Crowell added 2 commits May 15, 2021 16:41
The WhatWG fetch spec requires that Body.body (and therefore Response.body)
is always a readable stream, but it doesn't always happen that way in Node.
This seems to be because ResponseBuilder tries to fetch the stream module
from fetchMock, but it looks in the wrong place.

Fixes wheresrhys#609
@fluggo
Copy link
Author

fluggo commented May 15, 2021

I've fixed all the issues I can find. I can't access the circleci tests to see what it's complaining about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fetch-mock Response.body is not always a stream in Node.js
1 participant