Reduce _.isFinite, _.sortedIndex, and _.map, tweak docs for _.unescape, and ensure rewritten _.map works for objects correctly.

Former-commit-id: 43c810538b500b55018d4cfb9812618671fae2c7
This commit is contained in:
John-David Dalton
2012-10-21 11:32:16 -07:00
parent 74caea8f8f
commit 26aed3e89e
4 changed files with 90 additions and 77 deletions

View File

@@ -937,6 +937,19 @@
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.map');
(function() {
test('should return the correct result when iterating an object', function() {
var actual = _.map({ 'a': 1, 'b': 2, 'c': 3 }, function(value) {
return value;
});
deepEqual(actual, [1, 2, 3]);
});
}());
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.max and lodash.min object iteration');
_.each(['max', 'min'], function(methodName) {