mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
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:
11
test/test.js
11
test/test.js
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user