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

[code & learn]change the typeerror to a regular expression #14268

Closed
wants to merge 2 commits into from

Conversation

bangwu
Copy link
Contributor

@bangwu bangwu commented Jul 16, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jul 16, 2017
Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

LGTM if CI is green

@bangwu bangwu force-pushed the fix-stream-writable-null-test branch from 95062b7 to 62dc9f0 Compare July 16, 2017 07:24
@@ -32,7 +32,7 @@ assert.doesNotThrow(() => {
assert.throws(() => {
const m = new MyWritable();
m.write(false, (err) => assert.ok(err));
}, TypeError, 'Invalid non-string/buffer chunk');
}, /^TypeError: Invalid non-string\/buffer chunk$/, 'Invalid non-string/buffer chunk');
Copy link
Member

Choose a reason for hiding this comment

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

The third argument (the string) should probably be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have remove the unused third parameters

@joyeecheung joyeecheung added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Jul 16, 2017
@Trott
Copy link
Member

Trott commented Jul 16, 2017

@bangwu bangwu changed the title [Code & Learn]Change the TypeError to a regular expression [code & learn]change the typeerror to a regular expression Jul 16, 2017
@TimothyGu TimothyGu added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. and removed code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. labels Jul 16, 2017
@Trott
Copy link
Member

Trott commented Jul 16, 2017

Ci looks good. Single failure is unrelated flaky test.

Trott pushed a commit to Trott/io.js that referenced this pull request Jul 16, 2017
In test/parallel/test-stream-writable-null.js, use a regular expression
to validate error message in assert.throws() call.

PR-URL: nodejs#14268
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
@Trott
Copy link
Member

Trott commented Jul 16, 2017

Given straightforward and narrow nature of change, good CI, and plentiful collaborator approval, fast-tracking.

Landed in 242e7a8

@Trott Trott closed this Jul 16, 2017
@Trott
Copy link
Member

Trott commented Jul 16, 2017

Thanks for the contribution! 🎉

@tniessen
Copy link
Member

@Trott There is a typo in your commit message FYI

@Trott Trott marked this as a duplicate of #14294 Jul 17, 2017
@addaleax addaleax mentioned this pull request Jul 18, 2017
addaleax pushed a commit that referenced this pull request Jul 18, 2017
In test/parallel/test-stream-writable-null.js, use a regular expression
to validate error message in assert.throws() call.

PR-URL: #14268
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Fishrock123 pushed a commit that referenced this pull request Jul 19, 2017
In test/parallel/test-stream-writable-null.js, use a regular expression
to validate error message in assert.throws() call.

PR-URL: #14268
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 16, 2017
In test/parallel/test-stream-writable-null.js, use a regular expression
to validate error message in assert.throws() call.

PR-URL: #14268
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Aug 16, 2017
MylesBorins pushed a commit that referenced this pull request Aug 16, 2017
In test/parallel/test-stream-writable-null.js, use a regular expression
to validate error message in assert.throws() call.

PR-URL: #14268
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
MylesBorins pushed a commit that referenced this pull request Sep 5, 2017
In test/parallel/test-stream-writable-null.js, use a regular expression
to validate error message in assert.throws() call.

PR-URL: #14268
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.