Add test for string as object when passed as the third param to _.forEach callbacks.

This commit is contained in:
John-David Dalton
2014-08-22 22:27:13 -07:00
parent 61578f4dca
commit 691d566482

View File

@@ -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');
});
});