FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: Remove unnecessary asserion messages in test-crypto-hash.js by pgrzesik · Pull Request #18984 · nodejs/node · GitHub

/ node Public

test: Remove unnecessary asserion messages in test-crypto-hash.js - #18984

Closed
pgrzesik wants to merge 1 commit into
nodejs:masterfrom
pgrzesik:fix/improve-assertions-in-test-crypto-hash
Closed

test: Remove unnecessary asserion messages in test-crypto-hash.js#18984
pgrzesik wants to merge 1 commit into
nodejs:masterfrom
pgrzesik:fix/improve-assertions-in-test-crypto-hash

Conversation

Copy link
Copy Markdown
Contributor

This commit improves asserion messages in parallel/test-crypto-hash.js.
Instead of just simple string literal, messages are changed to also
include values used in assertion, which should improve debugging
in case of errors.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

None

nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 25, 2018

jasnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is an improvement but it would also be good to remove the message argument entirely.

Copy link
Copy Markdown
Contributor Author

Hey @jasnell, thanks for response, I don't have strong opinion on which approach is better - do you think that removing message args is a better way to improve those assertions ?

btw - I'd be more than happy to help on similar(or a bit more advanced) issues

Trott commented Mar 1, 2018

Copy link
Copy Markdown
Member

Comment thread test/parallel/test-crypto-hash.js Outdated

BridgeAR Mar 1, 2018
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

a7 is always undefined in this case. So it is the same as having a static message. The same applies for the test below. I think it is best to just remove the message all along. Probably in all cases here.

This commit improves asserion messages in parallel/test-crypto-hash.js.
Instead of just simple string literal, messages are changed to also
include values used in assertion, which should improve debugging
in case of errors.
pgrzesik force-pushed the fix/improve-assertions-in-test-crypto-hash branch from f9a906e to 5af816a Compare March 3, 2018 20:43
pgrzesik changed the title test: Add more verbose asserion messages in test-crypto-hash.js test: Remove unnecessary asserion messages in test-crypto-hash.js Mar 3, 2018

pgrzesik commented Mar 3, 2018

Copy link
Copy Markdown
Contributor Author

Following multiple suggestions, I decided to remove messages instead of rewriting them. Thanks @BridgeAR and @jasnell

Trott commented Mar 3, 2018

Copy link
Copy Markdown
Member

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Mar 6, 2018
BridgeAR pushed a commit that referenced this pull request Mar 11, 2018
This commit improves asserion messages in parallel/test-crypto-hash.js.
Instead of just simple string literal, messages are changed to also
include values used in assertion, which should improve debugging
in case of errors.

PR-URL: #18984
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>

Copy link
Copy Markdown
Member

Landed in 0e35683 🎉

BridgeAR closed this Mar 11, 2018

Copy link
Copy Markdown
Member

@pgrzesik congratulations to your first commit to Node.js 🎉

targos pushed a commit that referenced this pull request Mar 17, 2018
This commit improves asserion messages in parallel/test-crypto-hash.js.
Instead of just simple string literal, messages are changed to also
include values used in assertion, which should improve debugging
in case of errors.

PR-URL: #18984
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
targos mentioned this pull request Mar 18, 2018
MylesBorins pushed a commit that referenced this pull request Mar 20, 2018
This commit improves asserion messages in parallel/test-crypto-hash.js.
Instead of just simple string literal, messages are changed to also
include values used in assertion, which should improve debugging
in case of errors.

PR-URL: #18984
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
This commit improves asserion messages in parallel/test-crypto-hash.js.
Instead of just simple string literal, messages are changed to also
include values used in assertion, which should improve debugging
in case of errors.

PR-URL: nodejs#18984
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
jasnell pushed a commit to jasnell/node that referenced this pull request Aug 17, 2018
This commit improves asserion messages in parallel/test-crypto-hash.js.
Instead of just simple string literal, messages are changed to also
include values used in assertion, which should improve debugging
in case of errors.

PR-URL: nodejs#18984
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
MylesBorins pushed a commit that referenced this pull request Sep 6, 2018
This commit improves asserion messages in parallel/test-crypto-hash.js.
Instead of just simple string literal, messages are changed to also
include values used in assertion, which should improve debugging
in case of errors.

Backport-PR-URL: #22380
PR-URL: #18984
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
MylesBorins mentioned this pull request Sep 6, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL