-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: cleaning up test/parallel/test-crypto-binary-default.js #19054
test: cleaning up test/parallel/test-crypto-binary-default.js #19054
Conversation
32d9450
to
624a417
Compare
@watilde It seemed that my commit messages were failing the jenkins build. I have updated my commit messages! |
624a417
to
250cb97
Compare
@wuweiweiwu Thanks for the update! I will trigger CI again. |
@watilde I am not sure why node-test-commit is failing. I ran |
The default message will be printed if the assertion fires. PR-URL: nodejs#19054 Reviewed-By: James M Snell <[email protected]>
Puts related variables and tests in the same scope. PR-URL: nodejs#19054 Reviewed-By: James M Snell <[email protected]>
250cb97
to
b0f8682
Compare
@wuweiweiwu Thanks for checking it! I just read the ci logs(16560, 2562, 16741, 16051) and the errors seem not related to this patch :) Let's leave this for one more day to get more review. |
new ci for the last updates: https://ci.nodejs.org/job/node-test-pull-request/13421/ |
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.
LGTM, just one nit about something that was there before.
'361ee3dba91ca5c11aa25eb4d679275cc5788063a5f19741120c4f2d' + | ||
'e2adebeb10a298dd' | ||
} | ||
}, | ||
|
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.
This line seems obsolete and should probably be removed.
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.
Can you briefly explain why the line is obsolete?
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.
These are entries in an array and all other entries are separated without extra line break.
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.
@BridgeAR Fixed :)
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.
I'm really not clear why block scoping in this test is worth the massive diff, given how little else is changing... If something was, I wouldn't even be able to find it with 800 insertions + deletions... Does anyone that reviewed this actually claim to have scanned line by line? There isn't even any variable re-use, race conditions, or anything else here that block scoping helps us resolve.
I hate to be a downer but I'm really -1 on these type of changes.
@apapirovski I personally feel similar about this as you but it felt like it does not hurt either and that is why I signed it. It is possible to review this by using the split view. In that case it is much easier to scan line by line. |
@apapirovski @BridgeAR Add FWIW, I think adding block scope is higher value than a lot of the changes we otherwise seem to routinely approve, like changing functions to arrow functions. |
@Trott thanks! Is that somewhere in the GitHub interface or just a well-known trick? |
AFAIK it is not in the interface nor particularly well-known, but wow is it useful IMO. |
removing extra line break
Landed in 1ebd966 |
The default message will be printed if the assertion fires. Use block scope for related variables and tests. PR-URL: #19054 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
@wuweiweiwu Congrats on landing your first commit in Node.js core! 🎉 Hope there are many more to come :) |
The default message will be printed if the assertion fires. Use block scope for related variables and tests. PR-URL: nodejs#19054 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
The default message will be printed if the assertion fires. Use block scope for related variables and tests. PR-URL: nodejs#19054 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
The default message will be printed if the assertion fires. Use block scope for related variables and tests. PR-URL: #19054 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Moving assertion error message to comment on top of test.
Scoping tests for better readability and debugging.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test