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: add a test for Server. listen callback runtime binding #35657

Closed
wants to merge 4 commits into from
Closed

test: add a test for Server. listen callback runtime binding #35657

wants to merge 4 commits into from

Conversation

adinhtdsibm
Copy link
Contributor

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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 15, 2020
modified the file test-http-pause.js by replacing the function ()=>
Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

Hello 👋 Thanks for your work, and welcome to the Node.js repo.

I think using an anonymous function for this test was on purpose, because we want to make sure the callback is bind to the server instance. By replacing it with an arrow function, this PR removes an important test.

What I suggest instead is to make the use of an anonymous function explicit with a comment and an equality check.

test/parallel/test-http-pause.js Outdated Show resolved Hide resolved
test/parallel/test-http-pause.js Outdated Show resolved Hide resolved
adinhtdsibm and others added 2 commits October 16, 2020 14:07
Updating the changes as requested above.

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Updated the changes as requested.

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@adinhtdsibm
Copy link
Contributor Author

Hello 👋 Thanks for your work, and welcome to the Node.js repo.

I think using an anonymous function for this test was on purpose, because we want to make sure the callback is bind to the server instance. By replacing it with an arrow function, this PR removes an important test.

What I suggest instead is to make the use of an anonymous function explicit with a comment and an equality check.

Committed the changes as requested. Thanks for the information provided for the updates.

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 16, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 16, 2020
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@aduh95
Copy link
Contributor

aduh95 commented Oct 17, 2020

Note to who ever merges this PR: the original commit message needs to change to reflect what this PR is now doing; maybe something like:

test: add a test for Server.listen callback runtime binding

@adinhtdsibm adinhtdsibm changed the title test: replace anonymous function with arrow function test: add a test for Server. listen callback runtime binding Oct 17, 2020
gireeshpunathil pushed a commit that referenced this pull request Oct 17, 2020
PR-URL: #35657
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@gireeshpunathil
Copy link
Member

landed in 9ce5a03 . Thanks for the contribution!

BethGriggs pushed a commit that referenced this pull request Dec 8, 2020
PR-URL: #35657
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Dec 10, 2020
BethGriggs pushed a commit that referenced this pull request Dec 15, 2020
PR-URL: #35657
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants