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

test: fix body test #1375

Merged
merged 1 commit into from
Aug 23, 2019
Merged

test: fix body test #1375

merged 1 commit into from
Aug 23, 2019

Conversation

ronag
Copy link
Contributor

@ronag ronag commented Aug 17, 2019

Setting body will set the content-length header. Unless the
corresponding number of bytes are sent the response will
be aborted and not emit 'end'.

@codecov
Copy link

codecov bot commented Aug 17, 2019

Codecov Report

Merging #1375 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1375   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files           4       4           
  Lines         379     379           
======================================
  Hits          379     379

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 061c21f...23f9a93. Read the comment docs.

@dead-horse
Copy link
Member

What‘s the real problem this pull request fixed?

@ronag
Copy link
Contributor Author

ronag commented Aug 19, 2019

The test depends on ‘end’ being emitted. However, since the content length doesn’t match node will emit ‘aborted’. I’m future version of node, end will not be emitted after aborted (that’s a bug).

@ronag
Copy link
Contributor Author

ronag commented Aug 19, 2019

See nodejs/node#27984

Setting body will set the content-length header. Unless the
corresponding number of bytes are sent the response will
be aborted and not emit 'end'.
@dead-horse dead-horse merged commit 817b498 into koajs:master Aug 23, 2019
@dead-horse
Copy link
Member

thanks!

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.

None yet

2 participants