-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Conversation
There was a problem hiding this 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
95062b7
to
62dc9f0
Compare
@@ -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'); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Ci looks good. Single failure is unrelated flaky test. |
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 <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
Given straightforward and narrow nature of change, good CI, and plentiful collaborator approval, fast-tracking. Landed in 242e7a8 |
Thanks for the contribution! 🎉 |
@Trott There is a typo in your commit message FYI |
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 <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
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 <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
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 <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
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 <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
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 <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)