mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Add test for string as object when passed as the third param to _.forEach callbacks.
This commit is contained in:
@@ -3889,7 +3889,7 @@
|
||||
'object': Object('abc')
|
||||
},
|
||||
function(collection, key) {
|
||||
test('`_.' + methodName + '` should work with a string ' + key + ' for `collection` (test in IE < 9)', 2, function() {
|
||||
test('`_.' + methodName + '` should work with a string ' + key + ' for `collection` (test in IE < 9)', 3, function() {
|
||||
var args,
|
||||
values = [];
|
||||
|
||||
@@ -3905,6 +3905,7 @@
|
||||
deepEqual(args, ['c', 2, collection]);
|
||||
deepEqual(values, ['c', 'b', 'a']);
|
||||
}
|
||||
strictEqual(typeof args[2], 'object');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user