-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: http outgoing _renderHeaders #13981
Conversation
const common = require('../common'); | ||
const assert = require('assert'); | ||
|
||
const outHeadersKey = require('internal/http').outHeadersKey; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will probably need to have // Flags: --expose-internal
added on the line below 'use strict';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that automatically read by node, or is that for fellow developers? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s read by the test runner, so if you run it as make test
or python tools/test.py parallel/test-http-outgoing-renderHeaders
, it will automatically be used. If you want to run the test file manually as ./node test/parallel/test-http-outgoing-renderHeaders.js
, you’ll also need to add the flag yourself.
const http = require('http'); | ||
const OutgoingMessage = http.OutgoingMessage; | ||
|
||
const outgoingMessage = new OutgoingMessage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you isolate these tests using block scoping. That prevents the need for outgoingMessage
, outgoingMessage2
, etc. It also reduces the potential for the tests interacting with each other unintentionally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed the code to use block scoping, it seemed a dirty solution without it, thanks for the advice!
@@ -0,0 +1,47 @@ | |||
'use strict' | |||
// Flags: --expose-internal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this pass make test
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You were right I missed a s
at the end. Thanks.
is there anything I should do to get this merged? |
@Peteyy we need to run the automatic test suite before this could land. For technical reasons that will only be possible tomorrow (2017-07-10). I'm set myself a calendar reminder. |
@refack any news since then? |
PR-URL: nodejs#13981 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #13981 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
PR-URL: #13981 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
Improve http outgoing test coverage
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
http-outgoing