Add _.chain tests and ensure they pass.

Former-commit-id: e365b65da8a740383c975c7b904ad2156d1cc8ab
This commit is contained in:
John-David Dalton
2013-05-14 22:48:34 -07:00
parent fdc9d5f1fd
commit ee1933389a
9 changed files with 51 additions and 24 deletions

View File

@@ -338,6 +338,23 @@
});
}());
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.chain');
(function() {
test('should return a wrapped value', function() {
var actual = _.chain({ 'a': 0 });
ok(actual instanceof _);
});
test('should return the existing wrapper when chaining', function() {
var wrapper = _({ 'a': 0 });
equal(wrapper.chain(), wrapper);
});
}());
/*--------------------------------------------------------------------------*/
QUnit.module('cloning');