mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 12:07:10 -04:00
Update tests.
This commit is contained in:
parent
18a62ca831
commit
787eae7a80
22 changed files with 113 additions and 161 deletions
17
test/util/assert.js
Normal file
17
test/util/assert.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
var assert = chai.assert;
|
||||
|
||||
assert.lengthOfKeys = function (val, count, msg) {
|
||||
|
||||
var keyCount = _.keys(val).length;
|
||||
assert(keyCount === count, msg ? msg : 'expected ' + val + ' to have ' + count + ' keys, but has ' + keyCount);
|
||||
};
|
||||
|
||||
assert.isPlainObject = function (val, msg) {
|
||||
|
||||
assert($.isPlainObject(val), msg ? msg : 'expected ' + val + ' to be a plain Object');
|
||||
};
|
||||
|
||||
}());
|
Loading…
Add table
Add a link
Reference in a new issue