diff --git a/test/parallel/test-os.js b/test/parallel/test-os.js index f7fe4634c40dca..15fd189f9be20e 100644 --- a/test/parallel/test-os.js +++ b/test/parallel/test-os.js @@ -13,7 +13,7 @@ if (common.isWindows) { process.env.TEMP = ''; assert.equal(os.tmpdir(), '/tmp'); process.env.TMP = ''; - var expected = (process.env.SystemRoot || process.env.windir) + '\\temp'; + const expected = (process.env.SystemRoot || process.env.windir) + '\\temp'; assert.equal(os.tmpdir(), expected); process.env.TEMP = '\\temp\\'; assert.equal(os.tmpdir(), '\\temp'); @@ -83,21 +83,25 @@ var interfaces = os.networkInterfaces(); console.error(interfaces); switch (platform) { case 'linux': - var filter = function(e) { return e.address == '127.0.0.1'; }; - var actual = interfaces.lo.filter(filter); - var expected = [{ address: '127.0.0.1', netmask: '255.0.0.0', - mac: '00:00:00:00:00:00', family: 'IPv4', - internal: true }]; - assert.deepEqual(actual, expected); - break; + { + const filter = function(e) { return e.address == '127.0.0.1'; }; + const actual = interfaces.lo.filter(filter); + const expected = [{ address: '127.0.0.1', netmask: '255.0.0.0', + mac: '00:00:00:00:00:00', family: 'IPv4', + internal: true }]; + assert.deepEqual(actual, expected); + break; + } case 'win32': - var filter = function(e) { return e.address == '127.0.0.1'; }; - var actual = interfaces['Loopback Pseudo-Interface 1'].filter(filter); - var expected = [{ address: '127.0.0.1', netmask: '255.0.0.0', - mac: '00:00:00:00:00:00', family: 'IPv4', - internal: true }]; - assert.deepEqual(actual, expected); - break; + { + const filter = function(e) { return e.address == '127.0.0.1'; }; + const actual = interfaces['Loopback Pseudo-Interface 1'].filter(filter); + const expected = [{ address: '127.0.0.1', netmask: '255.0.0.0', + mac: '00:00:00:00:00:00', family: 'IPv4', + internal: true }]; + assert.deepEqual(actual, expected); + break; + } } var EOL = os.EOL;