Skip to content

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

Closed
bangwu wants to merge 2 commits into
nodejs:masterfrom
bangwu:fix-stream-writable-null-test
Closed

[code & learn]change the typeerror to a regular expression#14268
bangwu wants to merge 2 commits into
nodejs:masterfrom
bangwu:fix-stream-writable-null-test

Conversation

@bangwu

Copy link
Copy Markdown
Contributor
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-botnodejs-github-bot added the test Issues and PRs related to the tests. label Jul 16, 2017

@TrottTrott left a comment

Copy link
Copy Markdown
Member

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
bangwuforce-pushed the fix-stream-writable-null-test branch from 95062b7 to 62dc9f0CompareJuly 16, 2017 07:24
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@joyeecheungjoyeecheung 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
Copy Markdown
Member

@bangwubangwu changed the title [Code & Learn]Change the TypeError to a regular expression[code & learn]change the typeerror to a regular expressionJul 16, 2017
@TimothyGuTimothyGu 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
Copy Markdown
Member

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
Copy Markdown
Member

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

Landed in 242e7a8

@TrottTrott closed this Jul 16, 2017
@Trott

Copy link
Copy Markdown
Member

Thanks for the contribution! 🎉

@tniessen

Copy link
Copy Markdown
Member

@Trott There is a typo in your commit message FYI

@TrottTrott marked this as a duplicate of #14294Jul 17, 2017
@addaleaxaddaleax 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>
@MylesBorinsMylesBorins 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 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.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

11 participants

@bangwu@Trott@tniessen@refack@TimothyGu@cjihrig@gireeshpunathil@gibfahn@MylesBorins@joyeecheung@nodejs-github-bot