Update buffer swap test to use better variable names#12544
Update buffer swap test to use better variable names#12544neeharv wants to merge 1 commit intonodejs:masterfrom
Conversation
|
cc @Trott |
test/parallel/test-buffer-swap.js
Outdated
There was a problem hiding this comment.
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.jshas all variables defined at the top level scope, and hence the variable names are variations ofbuf,buf2,buf3etc.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