Skip to content

Conversation

@pgrzesik
Copy link
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-botnodejs-github-bot added the test Issues and PRs related to the tests. label Feb 25, 2018
Copy link
Member

@jasnelljasnell left a comment

Choose a reason for hiding this comment

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

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

@pgrzesik
Copy link
ContributorAuthor

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
Copy link
Member

Trott commented Mar 1, 2018

Copy link
Member

@BridgeARBridgeARMar 1, 2018

Choose a reason for hiding this comment

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

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.
@pgrzesikpgrzesikforce-pushed the fix/improve-assertions-in-test-crypto-hash branch from f9a906e to 5af816aCompareMarch 3, 2018 20:43
@pgrzesikpgrzesik changed the title test: Add more verbose asserion messages in test-crypto-hash.jstest: Remove unnecessary asserion messages in test-crypto-hash.jsMar 3, 2018
@pgrzesik
Copy link
ContributorAuthor

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

@Trott
Copy link
Member

Trott commented Mar 3, 2018

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, 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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
@BridgeAR
Copy link
Member

Landed in 0e35683 🎉

@BridgeAR
Copy link
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
@targostargos 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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Sep 6, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@pgrzesik@Trott@BridgeAR@jasnell@tniessen@nodejs-github-bot