wow
This commit is contained in:
+17
@@ -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'
|
||||
);
|
||||
});
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user