-
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: improve crypto coverage #11279
Conversation
If possible, it would be great if the regular expressions could cover the entire error message. For example, instead of |
@nodejs/testing |
c2701df
to
ccc74df
Compare
@Trott Thanks! fixed. |
test/parallel/test-crypto-dh.js
Outdated
// invalid test: curve argument is undefined | ||
assert.throws(() => { | ||
crypto.createECDH(); | ||
}, /"curve" argument should be a string/); |
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.
You can change this line to /^TypeError: "curve" argument should be a string$/
.
- check exception when ECDH curve is undefined - check exception when getPublicKey format is invalid
ccc74df
to
b95d606
Compare
@abouthiroppy Thanks! and sorry for letting you point out the same thing. I fixed 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.
Thank you for your contribution :)
* check exception when ECDH curve is undefined * check exception when getPublicKey format is invalid PR-URL: #11279 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed on 513d9bb |
* check exception when ECDH curve is undefined * check exception when getPublicKey format is invalid PR-URL: nodejs#11279 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
* check exception when ECDH curve is undefined * check exception when getPublicKey format is invalid PR-URL: #11279 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
* check exception when ECDH curve is undefined * check exception when getPublicKey format is invalid PR-URL: #11279 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
will need a backport PR to land on v4 |
* check exception when ECDH curve is undefined * check exception when getPublicKey format is invalid PR-URL: #11279 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
This PR improves test coverage on crypto dh functions.
Just add 2 exceptions check.
Please review.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
N/A