mirror of
https://github.com/cwinfo/hyperboria-peers.git
synced 2024-11-22 08:20:27 +00:00
fix javascript test
This commit is contained in:
parent
b4677843cf
commit
3ef2af59f3
6
tests.js
6
tests.js
@ -19,6 +19,7 @@ var isIp = function (host) {
|
|||||||
|
|
||||||
var credsWithDns = Peers.filter(function (x, p) {
|
var credsWithDns = Peers.filter(function (x, p) {
|
||||||
return Object.keys(x).some(function (k) {
|
return Object.keys(x).some(function (k) {
|
||||||
|
if (Array.isArray(x[k])) { return; }
|
||||||
return !isIp(k);
|
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 requiredMsg = "[%s] => %s is missing the required field '%s'";
|
||||||
var recommendedMsg = "[%s] => '%s' is missing the recommended 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 cred = x[k];
|
||||||
var fields = Object.keys(cred);
|
var fields = Object.keys(cred);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user