Skip to content

Commit 4e78cd7

Browse files
committed
test: skip IPv6 part before testing it
PR-URL: #2226 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent 93660c8 commit 4e78cd7

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
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
varlocalhost_ipv6='::1';
2429
varfamily_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
varanycast_ipv6='::';
4646
varserver1=net.createServer();

0 commit comments

Comments
 (0)