test: add test for internalConnect() when address type is IPv6#22444
test: add test for internalConnect() when address type is IPv6#22444yanivfriedensohn wants to merge 2 commits intonodejs:masterfrom
Conversation
|
The Travis CI failure seems related: |
0fef1ee to
9c172e7
Compare
9c172e7 to
ba908ba
Compare
| }; | ||
|
|
||
| client.on('error', common.mustCall(function onError(err) { | ||
| const onError = (err, options) => { |
There was a problem hiding this comment.
Could this be a function declaration?
function onError(err, options) {There was a problem hiding this comment.
It's a named function expression.
There was a problem hiding this comment.
It's a style preference, function declaration are much more common in the test suite than named function expressions.
|
Thanks @addaleax, I added |
|
CI: https://ci.nodejs.org/job/node-test-pull-request/16650/ (edit: ✔️) |
|
Hello @yanivfriedensohn and אהלן. Thank you for your contribution 🥇 P.S. If you have any question you can also feel free to contact me directly. |
|
Hi @refack and שלום. Following your comment I changed |
|
Thank you for following up. |
|
Landed in e03f9c5, thanks for the PR! 🎉 |
PR-URL: #22444 Reviewed-By: Refael Ackermann <refack@gmail.com>
PR-URL: #22444 Reviewed-By: Refael Ackermann <refack@gmail.com>
PR-URL: #22444 Reviewed-By: Refael Ackermann <refack@gmail.com>
PR-URL: #22444 Reviewed-By: Refael Ackermann <refack@gmail.com>
According to the latest coverage report, internalConnect() is uncovered when address type is IPv6 (https://coverage.nodejs.org/coverage-36696cfe8479f3fd/root/net.js.html#L887). This PR adds a test for internalConnect() when address type is IPv6.
I didn't add a test when address type is neither IPv4 nor IPv6 since this condition isn't reachable.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes