Add _.ary test case for multiple applied arys.

This commit is contained in:
John-David Dalton
2015-12-28 10:11:17 -06:00
parent e5730af949
commit 0f928233ce
2 changed files with 9 additions and 2 deletions

View File

@@ -1054,6 +1054,13 @@
assert.deepEqual(capped('a'), ['a']);
});
QUnit.test('should use the existing `ary` if smaller', function(assert) {
assert.expect(1);
var capped = _.ary(_.ary(fn, 1), 2);
assert.deepEqual(capped('a', 'b', 'c'), ['a']);
});
QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
assert.expect(1);