5
0
mirror of https://github.com/cwinfo/hyperboria-peers.git synced 2024-12-26 05:25:45 +00:00

fix javascript test

This commit is contained in:
ansuz 2017-08-24 08:43:59 +02:00
parent b4677843cf
commit 3ef2af59f3

View File

@ -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);