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: refactor test-dgram-broadcast-multi-process #26846

Closed
wants to merge 2 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Mar 21, 2019

  • 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
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

* 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
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Mar 21, 2019
@Trott
Copy link
Member Author

Trott commented Mar 21, 2019

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 22, 2019
@Trott
Copy link
Member Author

Trott commented Mar 22, 2019

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'),
Copy link
Member

Choose a reason for hiding this comment

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

why add a comma

Copy link
Member Author

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:

Screen Shot 2019-03-21 at 8 30 39 PM

Copy link
Member

Choose a reason for hiding this comment

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

tks

@Trott
Copy link
Member Author

Trott commented Mar 22, 2019

@Trott
Copy link
Member Author

Trott commented Mar 22, 2019

@Trott
Copy link
Member Author

Trott commented Mar 24, 2019

Landed in 8330555

@Trott Trott closed this Mar 24, 2019
Trott added a commit to Trott/io.js that referenced this pull request Mar 24, 2019
* 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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Mar 27, 2019
* 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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
targos pushed a commit that referenced this pull request Mar 27, 2019
* 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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@Trott Trott deleted the test-dgram-broadcast-null-process branch January 13, 2022 22:51
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.

5 participants