Add _.zipObject test for extra values.

This commit is contained in:
John-David Dalton
2014-01-27 20:00:47 -08:00
parent 6cef7d5060
commit 1b79448ac2

View File

@@ -1506,7 +1506,7 @@
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.createCallback');
QUnit.module('lodash.callback');
(function() {
test('should work with functions created by `_.partial` and `_.partialRight`', 2, function() {
@@ -8650,6 +8650,10 @@
deepEqual(actual, object);
});
test('should ignore extra `values`', 1, function() {
deepEqual(_.zipObject(['a'], [1, 2]), { 'a': 1 });
});
test('should accept a two dimensional array', 1, function() {
var actual = _.zipObject(array);
deepEqual(actual, object);