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

Update test-tcp-wrap-listen.js with strictEqual and ES6 syntax #8640

Closed
wants to merge 1 commit into from

Conversation

sstern6
Copy link
Contributor

@sstern6 sstern6 commented Sep 17, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

Tests

Description of change

Updated the test-tcp-wrap-listen.js to include strictEqual instead of equal, updated == to ===, and implemented new ES6 syntax where necessary.

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Sep 17, 2016
Copy link
Member

@addaleax addaleax left a 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', () => {
Copy link
Member

@addaleax addaleax Sep 17, 2016

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Member

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. :)

@mscdex mscdex added the net Issues and PRs related to the net subsystem. label Sep 17, 2016
Copy link
Member

@imyller imyller left a 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

@sstern6 sstern6 force-pushed the update-tcp-listen-test branch from 70a4b4d to 0b8126a Compare September 17, 2016 23:50
@Trott
Copy link
Member

Trott commented Sep 18, 2016

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: test: refactor parallel/test-tcp-wrap-listen Whoever lands this can fix that at that time, but if you want to fix it ahead of time, you'd be saving them a step.

CI: https://ci.nodejs.org/job/node-test-pull-request/4101/

@sstern6 sstern6 force-pushed the update-tcp-listen-test branch from 0b8126a to 59f463a Compare September 18, 2016 17:35
@sstern6
Copy link
Contributor Author

sstern6 commented Sep 18, 2016

@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

@Trott
Copy link
Member

Trott commented Sep 18, 2016

Failure on CI is an issue with CI and not this change, so LGTM.

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

LGTM

jasnell pushed a commit that referenced this pull request Sep 20, 2016
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>
@jasnell
Copy link
Member

jasnell commented Sep 20, 2016

Landed in 00dd33c. Thank you!

@jasnell jasnell closed this Sep 20, 2016
Fishrock123 pushed a commit that referenced this pull request Oct 11, 2016
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants