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 large event emitter tests #6446

Merged
merged 1 commit into from
May 2, 2016
Merged

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Apr 28, 2016

Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

This commit splits several large event emitter tests into smaller block scoped tests. This keeps the tests more isolated. This commit also replaces var with const, assert.equal() with assert.strictEqual(), and other small enhancements.

R= @Trott

@cjihrig cjihrig added the test Issues and PRs related to the tests. label Apr 28, 2016
const listener3 = common.mustCall(() => {
ee.removeListener('hello', listener4);
}, 2);
const listener4 = common.mustCall(() => {}, 1);
Copy link
Member

Choose a reason for hiding this comment

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

Would it be worth to use arrow functions in the rest of the code?
The ,1 is redundant and could be removed while we're here.

@santigimeno
Copy link
Member

LGTM. You can ignore the comments

@mscdex mscdex added the events Issues and PRs related to the events subsystem / EventEmitter. label Apr 28, 2016
@jasnell
Copy link
Member

jasnell commented Apr 28, 2016

LGTM

@Fishrock123
Copy link
Contributor

CI, since apparently other people are perfectly comfortable signing off without it...

https://ci.nodejs.org/job/node-test-pull-request/2414/

@cjihrig
Copy link
Contributor Author

cjihrig commented Apr 28, 2016

Flaky test-debug-port-from-cmdline.js timed out, and the OS X job didn't actually run.

@jasnell
Copy link
Member

jasnell commented Apr 28, 2016

New CI to see if we can get the OSX job through: https://ci.nodejs.org/job/node-test-pull-request/2417/

@cjihrig
Copy link
Contributor Author

cjihrig commented Apr 28, 2016

Looks like CI is at least partially hanging.

@addaleax
Copy link
Member

@cjihrig
Copy link
Contributor Author

cjihrig commented Apr 28, 2016

Heh. I guess that's that.

@MylesBorins
Copy link
Contributor

sorry about that 😄

@jasnell
Copy link
Member

jasnell commented Apr 29, 2016

CI is good.

This commit splits several large event emitter tests into smaller
block scoped tests. This keeps the tests more isolated. This
commit also replaces var with const, assert.equal() with
assert.stictEqual(), and other small enhancements.

PR-URL: nodejs#6446
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@cjihrig cjihrig merged commit 1ab5b4e into nodejs:master May 2, 2016
@cjihrig cjihrig deleted the test branch May 2, 2016 14:40
Fishrock123 pushed a commit that referenced this pull request May 4, 2016
This commit splits several large event emitter tests into smaller
block scoped tests. This keeps the tests more isolated. This
commit also replaces var with const, assert.equal() with
assert.stictEqual(), and other small enhancements.

PR-URL: #6446
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
joelostrowski pushed a commit to joelostrowski/node that referenced this pull request May 4, 2016
This commit splits several large event emitter tests into smaller
block scoped tests. This keeps the tests more isolated. This
commit also replaces var with const, assert.equal() with
assert.stictEqual(), and other small enhancements.

PR-URL: nodejs#6446
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins
Copy link
Contributor

this will need to be manually backported

@MylesBorins
Copy link
Contributor

ping @cjihrig do you want to backport this to v4?

@cjihrig
Copy link
Contributor Author

cjihrig commented Jun 2, 2016

@thealphanerd sure. Let me know once #6394 has landed on v4.x-staging, as this builds on it.

@MylesBorins
Copy link
Contributor

@cjihrig #6394 landed! Would you be able to backport?

cjihrig added a commit to cjihrig/node that referenced this pull request Nov 23, 2016
This commit splits several large event emitter tests into smaller
block scoped tests. This keeps the tests more isolated. This
commit also replaces var with const, assert.equal() with
assert.stictEqual(), and other small enhancements.

PR-URL: nodejs#6446
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 13, 2016
This commit splits several large event emitter tests into smaller
block scoped tests. This keeps the tests more isolated. This
commit also replaces var with const, assert.equal() with
assert.stictEqual(), and other small enhancements.

PR-URL: #6446
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
This commit splits several large event emitter tests into smaller
block scoped tests. This keeps the tests more isolated. This
commit also replaces var with const, assert.equal() with
assert.stictEqual(), and other small enhancements.

PR-URL: #6446
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
This commit splits several large event emitter tests into smaller
block scoped tests. This keeps the tests more isolated. This
commit also replaces var with const, assert.equal() with
assert.stictEqual(), and other small enhancements.

PR-URL: #6446
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
This commit splits several large event emitter tests into smaller
block scoped tests. This keeps the tests more isolated. This
commit also replaces var with const, assert.equal() with
assert.stictEqual(), and other small enhancements.

PR-URL: #6446
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
events Issues and PRs related to the events subsystem / EventEmitter. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants