When chaining, _.max and _.min should resolve the correct value when passed an array containing only one value. [closes #292]

Former-commit-id: 79c71c1851a73c23919a28aadd56490ded91166c
This commit is contained in:
John-David Dalton
2013-06-06 09:07:14 -07:00
parent a5d459749f
commit a46ef8d1a6
2 changed files with 16 additions and 5 deletions

View File

@@ -2004,6 +2004,17 @@
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.max and lodash.min chaining');
_.each(['max', 'min'], function(methodName) {
test('lodash.' + methodName + ' should resolve the correct value when passed an array containing only one value', function() {
var actual = _([40])[methodName]().value();
strictEqual(actual, 40);
});
});
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.memoize');
(function() {