test: cleaning up test/parallel/test-crypto-binary-default.js#19054
test: cleaning up test/parallel/test-crypto-binary-default.js#19054wuweiweiwu wants to merge 3 commits intonodejs:masterfrom
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 <jasnell@gmail.com>
Puts related variables and tests in the same scope. PR-URL: nodejs#19054 Reviewed-By: James M Snell <jasnell@gmail.com>
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/ |
BridgeAR
left a comment
There was a problem hiding this comment.
LGTM, just one nit about something that was there before.
| 'e2adebeb10a298dd' | ||
| } | ||
| }, | ||
|
|
There was a problem hiding this comment.
This line seems obsolete and should probably be removed.
There was a problem hiding this comment.
Can you briefly explain why the line is obsolete?
There was a problem hiding this comment.
These are entries in an array and all other entries are separated without extra line break.
There was a problem hiding this comment.
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 <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
@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 <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
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 <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
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 <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
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