This commit is contained in:
quoije
2023-05-10 21:03:22 -04:00
parent ef1b411c12
commit bd732815c7
1304 changed files with 192970 additions and 5407 deletions
+17
View File
@@ -0,0 +1,17 @@
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'
);
});
});
};