-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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 <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* check exception when ECDH curve is undefined * check exception when getPublicKey format is invalid PR-URL: #11279 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* check exception when ECDH curve is undefined * check exception when getPublicKey format is invalid PR-URL: #11279 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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 <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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