-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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: string to template literals, to include port #20889
Conversation
test: string to template literals, to include port test: string to template literals, to include port
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.
Thanks for working on this. Some changes are needed as otherwise the linter will complain.
@@ -28,7 +28,7 @@ if (cluster.isMaster) { | |||
|
|||
server.listen({ | |||
port: 0, | |||
exclusive: true | |||
exclusive: true, |
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.
Nit: please remove the comma here since it's an unrelated change. 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.
The comma is still here after the update. As it's not related to this PR, could you please remove it?
const worker2 = cluster.fork(); | ||
|
||
worker2.on('message', function(port2) { | ||
assert.strictEqual(port2, port2 | 0, 'second worker could not listen'); | ||
assert.strictEqual(port2, port2 | 0, `second worker could not listen on port ${port2}`); |
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 fail the linter, unfortunately. Same above.
You could instead realign like so:
assert.strictEqual(port2, port2 | 0,
`second worker could not listen on port ${port2}`);
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.
The alternative would be to just remove the message altogether and instead show the default error message. That would also be fine with me.
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 went ahead and removed it.
Hey guys, do you have some tips for me to make the checks successful, as i was not changing much? |
PR-URL: #20889 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
The failures are unrelated, CI is a bit noisy currently. Landed in 76a1feb, thank you! |
PR-URL: #20889 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
test: string to template literals, to include port
Usage of template literals to include the port if strictEqual fails.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes