-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Update test-tcp-wrap-listen.js with strictEqual and ES6 syntax #8640
Conversation
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.
LGTM with a suggestion
var c = net.createConnection(port); | ||
c.on('connect', function() { | ||
const c = net.createConnection(port); | ||
c.on('connect', () => { |
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 think this can be wrapped in common.mustCall
?
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.
sounds good, will update and repush, thanks for the feedback @addaleax
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.
@addaleax given my changes and the availability of strictEqual
shouldn't this doc https://github.com/nodejs/http2/blob/master/doc/guides/writing_tests.md be updated to always use const
and strictEqual
? I can make a separate PR for this but wanted to know your thoughts.
Thanks
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.
@sstern6 I guess so, yes. :)
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.
LGTM with @addaleax suggested change
nit: commit title should include test:
subsystem prefix
70a4b4d
to
0b8126a
Compare
LGTM if CI passes Nit: First line of the commit message should not be capitalized and should be 50 chars or less. I'd suggest: |
0b8126a
to
59f463a
Compare
@Trott Repushed and renamed commit. Not sure if the CI will fail again but didnt understand why it failed the first time. Let me know if anything else needs updating! If the CI fails again Ill dig into it and fix the issue. Thanks |
Failure on CI is an issue with CI and not this change, so LGTM. |
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.
LGTM
PR-URL: #8640 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 00dd33c. Thank you! |
PR-URL: #8640 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
Tests
Description of change
Updated the
test-tcp-wrap-listen.js
to includestrictEqual
instead ofequal
, updated==
to===
, and implemented new ES6 syntax where necessary.