-
Notifications
You must be signed in to change notification settings - Fork 30k
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: refactor test-dgram-broadcast-multi-process #26846
Conversation
* Add check that `signal` is not null in callback. * Use arrow functions for callbacks, destructuring where appropriate, and a trailing comma in multi-line arrays
const LOCAL_BROADCAST_HOST = '255.255.255.255'; | ||
const TIMEOUT = common.platformTimeout(5000); | ||
const messages = [ | ||
Buffer.from('First message to send'), | ||
Buffer.from('Second message to send'), | ||
Buffer.from('Third message to send'), | ||
Buffer.from('Fourth message to send') | ||
Buffer.from('Fourth message to send'), |
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.
why add a comma
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.
From https://eslint.org/docs/rules/comma-dangle:
Trailing commas simplify adding and removing items to objects and arrays, since only the lines you are modifying must be touched. Another argument in favor of trailing commas is that it improves the clarity of diffs when an item is added or removed from an object or array:
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.
tks
Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/21775/ |
Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/21784/ |
Landed in 8330555 |
* Add check that `signal` is not null in callback. * Use arrow functions for callbacks, destructuring where appropriate, and a trailing comma in multi-line arrays PR-URL: nodejs#26846 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* Add check that `signal` is not null in callback. * Use arrow functions for callbacks, destructuring where appropriate, and a trailing comma in multi-line arrays PR-URL: nodejs#26846 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* Add check that `signal` is not null in callback. * Use arrow functions for callbacks, destructuring where appropriate, and a trailing comma in multi-line arrays PR-URL: #26846 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
signal
is not null in callback.and a trailing comma in multi-line arrays
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes