-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Update buffer swap test to use better variable names #12544
Conversation
cc @Trott |
test/parallel/test-buffer-swap.js
Outdated
0x03, 0x04, 0x05, 0x06, 0x07, 0x08, | ||
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, | ||
0x0f, 0x10])); | ||
let commonBuf; |
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.
Isn't the point of moving to block scoping to avoid shared variables like this?
How about either moving the |
27b2ec0
to
00be8e1
Compare
00be8e1
to
a88fefb
Compare
Not sure why CI failed. All tests pass fine locally (OS X), looks like the fedora build failing was because I force pushed some changes while the tests were running. |
The two CI failures in the previous run look like build failures unrelated to this test change. Hopefully the newer CI run will come back all green. |
PR-URL: #12544 Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 5096651 |
PR-URL: #12544 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #12544 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #12544 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #12544 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #12544 Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#12544 Reviewed-By: James M Snell <jasnell@gmail.com>
tests/parallel/buffer-swap.js
has all variables defined at the top level scope, and hence the variable names are variations ofbuf
,buf2
,buf3
etc.This PR puts each setup/assertion code block into its own block, and renames the variables to be easier to read.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test