-
Notifications
You must be signed in to change notification settings - Fork 30k
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: replace assert messages with template strings #15996
Conversation
test/parallel/test-crypto-hash.js
Outdated
); | ||
} | ||
assert.strictEqual(a1, '8308651804facb7b9af8ffc53a33a22d6a1c8ac2', 'Test SHA1'); | ||
cryptoType = 'md5'; digest = 'hex'; |
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.
Please always use a new line for these assignments.
test/parallel/test-crypto-hash.js
Outdated
assert.strictEqual(a1, '8308651804facb7b9af8ffc53a33a22d6a1c8ac2', 'Test SHA1'); | ||
cryptoType = 'md5'; digest = 'hex'; | ||
assert.strictEqual(a1, '8308651804facb7b9af8ffc53a33a22d6a1c8ac2', | ||
`${cryptoType} with ${digest} digest failed to evaluate to expected hash value.`); |
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 line length exceeds 80 characters.
/cc @nodejs/crypto |
@nhoel congratulations on your first PR to Node.js! Right now this will need some further work before it can be merged though. Do you want to follow up on this? |
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.
With the exception of the formatting nits, the code changes LGTM. The formatting needs to be fixed before it can land, however.
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.
Hi @nhoel, thank you for trying to improve Node.js! It looks like there are still some oustanding stylistic issues that will get flagged by the linter. Could you try running make lint-js
or vcbuild.bat lint-js
(Windows) and fix everything it reports? See our contributing guide for more info: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#the-process-of-making-changes
Specifically for the test-crypto-hash.js test file.
bdc8a97
to
072086c
Compare
I went ahead and fixed the lint errors. PTAL. |
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.
Would be great to put the tests in blocks, can be done in another PR
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 introduction of cryptoType
and digest
appears to be unncessary unless someone DRYs the code up.
CI failures are unrelated. |
Landed in 4eaf1fc. |
Specifically for the test-crypto-hash.js test file. PR-URL: #15996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Specifically for the test-crypto-hash.js test file. PR-URL: #15996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Specifically for the test-crypto-hash.js test file. PR-URL: #15996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Specifically for the test-crypto-hash.js test file. PR-URL: #15996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Specifically for the test-crypto-hash.js test file. PR-URL: nodejs/node#15996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Specifically for the test-crypto-hash.js test file. PR-URL: nodejs/node#15996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Specifically for the test-crypto-hash.js test file. PR-URL: #15996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Specifically for the test-crypto-hash.js test file. PR-URL: #15996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Specifically for the test-crypto-hash.js test file. PR-URL: #15996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Specifically for the test-crypto-hash.js test file. PR-URL: nodejs/node#15996 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Specifically for the test-crypto-hash.js test file.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test