Skip to content

Response.bodyUsed should be false when there is no body#1686

Open
tkrotoff wants to merge 1 commit intonode-fetch:mainfrom
tkrotoff:fix-bodyUsed
Open

Response.bodyUsed should be false when there is no body#1686
tkrotoff wants to merge 1 commit intonode-fetch:mainfrom
tkrotoff:fix-bodyUsed

Conversation

@tkrotoff
Copy link
Contributor

@tkrotoff tkrotoff commented Dec 2, 2022

Fix #1684

const res = new Response(toCheck);
expect(res.bodyUsed).to.equal(false);

/* eslint-disable-next-line no-await-in-loop */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think this lint rule matters in context of unit test

data[INTERNALS].disturbed = true;

/* c8 ignore next 3 */
if (!(body instanceof Stream)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if disturbed = true should be done after this line

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.

Response.bodyUsed should be false when there is no body

1 participant