Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,14 @@ const PIPE = (() => {
return path.join(pipePrefix, pipeName);
})();

let hasIPv6;
{
const hasIPv6 = (() => {
const iFaces = os.networkInterfaces();
const re = isWindows ? /Loopback Pseudo-Interface/ : /lo/;
hasIPv6 = Object.keys(iFaces).some(function(name) {
return re.test(name) && iFaces[name].some(function(info) {
return info.family === 'IPv6';
});
return Object.keys(iFaces).some((name) => {
return re.test(name) &&
iFaces[name].some(({ family }) => family === 'IPv6');
});
}
})();

/*
* Check that when running a test with
Expand Down