From 5c38163787375b8c182295e2e597df9336c521ec Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 17 Jun 2011 22:40:29 +0200 Subject: [PATCH] Fixes #1197. Fix failing os.getNetworkInterfaces() test in test-os.js --- test/simple/test-os.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/simple/test-os.js b/test/simple/test-os.js index e4f238e4c7..34bb4b2859 100644 --- a/test/simple/test-os.js +++ b/test/simple/test-os.js @@ -64,6 +64,9 @@ var interfaces = os.getNetworkInterfaces(); console.error(interfaces); switch (platform) { case 'linux': - assert.equal('127.0.0.1', interfaces.lo.ip); + var filter = function(e) { return e.address == '127.0.0.1'; }; + var actual = interfaces.lo.filter(filter); + var expected = [{ address: '127.0.0.1', family: 'IPv4', internal: true }]; + assert.deepEqual(actual, expected); break; }