Skip to content

Commit 4e78cd7

Browse files
committed
test: skip IPv6 part before testing it
PR-URL: #2226 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
1 parent 93660c8 commit 4e78cd7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/sequential/test-net-server-address.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ server_ipv4.listen(common.PORT, common.localhostIPv4, function() {
1919
server_ipv4.close();
2020
});
2121

22+
if (!common.hasIPv6) {
23+
console.log('1..0 # Skipped: ipv6 part of test, no IPv6 support');
24+
return;
25+
}
26+
2227
// Test on IPv6 Server
2328
var localhost_ipv6 = '::1';
2429
var family_ipv6 = 'IPv6';
@@ -36,11 +41,6 @@ server_ipv6.listen(common.PORT, localhost_ipv6, function() {
3641
server_ipv6.close();
3742
});
3843

39-
if (!common.hasIPv6) {
40-
console.log('1..0 # Skipped: ipv6 part of test, no IPv6 support');
41-
return;
42-
}
43-
4444
// Test without hostname or ip
4545
var anycast_ipv6 = '::';
4646
var server1 = net.createServer();

0 commit comments

Comments
 (0)