Add array path test for _.zipObject.

This commit is contained in:
John-David Dalton
2015-11-23 21:48:10 -08:00
parent 393849384b
commit ce6c0f3082

View File

@@ -21470,10 +21470,12 @@
}); });
QUnit.test('should support deep paths', function(assert) { QUnit.test('should support deep paths', function(assert) {
assert.expect(1); assert.expect(2);
var actual = _.zipObject(['a.b.c'], [1]); lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path) {
assert.deepEqual(actual, { 'a': { 'b': { 'c': 1 } } }); var actual = _.zipObject([path], [1]);
assert.deepEqual(actual, { 'a': { 'b': { 'c': 1 } } });
});
}); });
QUnit.test('should work in a lazy sequence', function(assert) { QUnit.test('should work in a lazy sequence', function(assert) {