Skip to content

Conversation

@russokj
Copy link
Contributor

@russokjrussokj commented Dec 1, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

The assert throws() should include a constructor or RegExp as a second
argument.

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@mscdexmscdex added the events Issues and PRs related to the events subsystem / EventEmitter. label Dec 1, 2016
@imyllerimyller added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Dec 1, 2016
@mscdex
Copy link
Contributor

Please see the commit message guidelines here.

@russokjrussokj changed the title test: assert throws() needs second argument in test/parallel/test: add second argument to assert.throws()Dec 1, 2016
@russokj
Copy link
ContributorAuthor

Updated the commit message to hopefully follow guidelines

@russokjrussokj closed this Dec 5, 2016
@russokjrussokj reopened this Dec 5, 2016
Copy link
Contributor

@cjihrigcjihrig left a comment

Choose a reason for hiding this comment

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

This is an improvement, but a regular expression would likely be better.

Copy link
Member

@jasnelljasnell left a comment

Choose a reason for hiding this comment

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

Almost there!

Copy link
Member

Choose a reason for hiding this comment

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

These checks would be more useful with a regexp as the second argument rather than simply Error:

assert.throws(function(){e.setMaxListeners(NaN);},/^TypeError:"n"argumentmustbeapositivenumber$/);

@Trott
Copy link
Member

Ping @russokj: Can you make the change requested by @jasnell?

The assert.throws() calls in test-event-emitter-max-listeners.js should include a constructor or RegExp as a second argument.
@Trott
Copy link
Member

Trott commented Dec 24, 2016

@jasnell I updated @russokj's branch per your comment. Can you take a look and update your review if appropriate?

@Trott
Copy link
Member

jasnell pushed a commit that referenced this pull request Dec 24, 2016
The assert.throws() calls in test-event-emitter-max-listeners.js should include a constructor or RegExp as a second argument. PR-URL: #9987 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@jasnell
Copy link
Member

Landed in 1fddf5b

@jasnelljasnell closed this Dec 24, 2016
@Trott
Copy link
Member

Thanks for the contribution @russokj! 🎉

targos pushed a commit that referenced this pull request Dec 26, 2016
The assert.throws() calls in test-event-emitter-max-listeners.js should include a constructor or RegExp as a second argument. PR-URL: #9987 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@russokj
Copy link
ContributorAuthor

Just got back from vacation - thanks for making the changes.

targos pushed a commit that referenced this pull request Dec 28, 2016
The assert.throws() calls in test-event-emitter-max-listeners.js should include a constructor or RegExp as a second argument. PR-URL: #9987 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@evanlucasevanlucas mentioned this pull request Jan 3, 2017
evanlucas pushed a commit that referenced this pull request Jan 3, 2017
The assert.throws() calls in test-event-emitter-max-listeners.js should include a constructor or RegExp as a second argument. PR-URL: #9987 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
The assert.throws() calls in test-event-emitter-max-listeners.js should include a constructor or RegExp as a second argument. PR-URL: #9987 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Jan 23, 2017
The assert.throws() calls in test-event-emitter-max-listeners.js should include a constructor or RegExp as a second argument. PR-URL: #9987 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
The assert.throws() calls in test-event-emitter-max-listeners.js should include a constructor or RegExp as a second argument. PR-URL: #9987 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
The assert.throws() calls in test-event-emitter-max-listeners.js should include a constructor or RegExp as a second argument. PR-URL: #9987 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.eventsIssues and PRs related to the events subsystem / EventEmitter.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@russokj@mscdex@Trott@jasnell@cjihrig@MylesBorins@imyller@targos@nodejs-github-bot