Files
2023-05-10 21:03:22 -04:00

18 lines
449 B
JavaScript

const isFQDN = require('validator').isFQDN;
/*
Check if all the elements are valid domains
*/
module.exports = function (chai) {
chai.Assertion.addProperty('isFQDN', function () {
var obj = this._obj, _this = this;
obj.forEach(function(o){
_this.assert(
isFQDN(o)
, 'expected "' + o + '" to be a valid domain'
, 'expected "' + o + '" to not be all lowecase'
);
});
});
};