-
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
test: use assert regexp in tls no cert test #12891
Conversation
@arturgvieira thank you very much for the contribution 🥇 |
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.
Might be nice to put the regexp on its own line to keep everything to 80 chars or less. Not required, though. (When it eventually gets replaced with common.expectsError()
, it will get wrapped at that time, so I'm not going to sweat it.)
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 with a style nit.
@@ -41,7 +41,8 @@ tls.createServer(assert.fail) | |||
tls.createServer({}) | |||
.listen(0, common.mustCall(close)); | |||
|
|||
assert.throws(() => tls.createServer('this is not valid'), TypeError); | |||
assert.throws(() => tls.createServer('this is not valid'), | |||
/^TypeError: options must be an object$/); |
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.
Can you indent this please.
@cjihrig Just fixed it. |
@arturgvieira can you please run |
@lpinca Fixed the lint error, trailing spaces. |
Rerun macOS CI:https://ci.nodejs.org/job/node-test-commit-osx/9635/ |
Replace the assert throws second argument from a contructor to a regexp matching the entire error message.
Replace the `assert.throws` second argument from a Type to a `RegExp` matching the entire error message. Error message changes are `semver-major`, so we assert their content. PR-URL: nodejs#12891 Refs: nodejs#12603 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Cai <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in cfe7b34 |
Post land CI:https://ci.nodejs.org/job/node-test-commit/9785/ |
Replace the `assert.throws` second argument from a Type to a `RegExp` matching the entire error message. Error message changes are `semver-major`, so we assert their content. PR-URL: nodejs#12891 Refs: nodejs#12603 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Cai <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: James M Snell <[email protected]>
Replace the `assert.throws` second argument from a Type to a `RegExp` matching the entire error message. Error message changes are `semver-major`, so we assert their content. PR-URL: #12891 Refs: #12603 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Cai <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: James M Snell <[email protected]>
Replace the `assert.throws` second argument from a Type to a `RegExp` matching the entire error message. Error message changes are `semver-major`, so we assert their content. PR-URL: #12891 Refs: #12603 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Cai <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: James M Snell <[email protected]>
Replace the assert throws second argument from a contructor to a regexp
matching the entire error message.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test tls