From 3ef2af59f394e768878254e110fc2189bcaef475 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 24 Aug 2017 08:43:59 +0200 Subject: [PATCH] fix javascript test --- tests.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests.js b/tests.js index 9bd716b..3160726 100755 --- a/tests.js +++ b/tests.js @@ -19,6 +19,7 @@ var isIp = function (host) { var credsWithDns = Peers.filter(function (x, p) { return Object.keys(x).some(function (k) { + if (Array.isArray(x[k])) { return; } return !isIp(k); }); }); @@ -47,7 +48,10 @@ var insufficientFields = Peers.filter(function (x, p) { var requiredMsg = "[%s] => %s is missing the required field '%s'"; var recommendedMsg = "[%s] => '%s' is missing the recommended field '%s'"; - Object.keys(x).map(function (k) { + Object.keys(x).forEach(function (k) { + if (Array.isArray(x[k])) { return; } + + var cred = x[k]; var fields = Object.keys(cred);