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: use emitter.listenerCount() in test-http-connect #26031

Closed
wants to merge 1 commit into from

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Feb 10, 2019

Use emitter.listenerCount() instead of the length property of the
array returned by emitter.listeners().

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Use `emitter.listenerCount()` instead of the `length` property of the
array returned by `emitter.listeners()`.
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 10, 2019
@lpinca
Copy link
Member Author

lpinca commented Feb 10, 2019

I understand this has very little value but using ee.listeners('foo').length when ee.listenerCount('foo') exists, triggers my OCD.

It's ok if this is not accepted.

@danbev
Copy link
Contributor

danbev commented Feb 13, 2019

@addaleax
Copy link
Member

Landed in 2b090c1

@addaleax addaleax closed this Feb 13, 2019
addaleax pushed a commit that referenced this pull request Feb 13, 2019
Use `emitter.listenerCount()` instead of the `length` property of the
array returned by `emitter.listeners()`.

PR-URL: #26031
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@lpinca lpinca deleted the fix/ocd branch February 14, 2019 06:06
targos pushed a commit that referenced this pull request Feb 14, 2019
Use `emitter.listenerCount()` instead of the `length` property of the
array returned by `emitter.listeners()`.

PR-URL: #26031
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@targos targos mentioned this pull request Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants