Publish tests.

This commit is contained in:
Lars Jung 2015-04-22 17:12:45 +02:00
parent 5a8ecd593d
commit c396800dfa
40 changed files with 21478 additions and 1 deletions

View file

@ -0,0 +1,20 @@
(function () {
'use strict';
chai.Assertion.addChainableMethod('lengthOfKeys', function (count) {
var keyCount = _.keys(this._obj).length;
this.assert(
keyCount === count,
'expected ' + this._obj + ' to have ' + count + ' keys, but has ' + keyCount,
'expected ' + this._obj + ' not to have ' + count + ' keys, but has ' + keyCount
);
});
chai.assert.lengthOfKeys = function (val, count, msg) {
new chai.Assertion(val, msg).to.be.lengthOfKeys(count);
};
}());