mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Simplify _.zip for the underscore build.
Former-commit-id: 18560e78f052fad5c5d7af1ef6571dd31accf690
This commit is contained in:
@@ -1079,6 +1079,10 @@
|
||||
deepEqual(lodash.findWhere(collection, { 'a': 1 }), collection[0], '_.findWhere: ' + basename);
|
||||
strictEqual(lodash.findWhere(collection, {}), null, '_.findWhere should return `null` for falsey `properties`: ' + basename);
|
||||
|
||||
var expected = [[['moe', 30, true]], [['larry', 40, false]]];
|
||||
actual = lodash.unzip(lodash.zip(['moe', 'larry'], [30, 40], [true, false]));
|
||||
deepEqual(actual, expected, '_.zip is unable to correctly consume it\'s output: ' + basename);
|
||||
|
||||
start();
|
||||
});
|
||||
});
|
||||
@@ -1577,7 +1581,8 @@
|
||||
'uniq',
|
||||
'uniqueId',
|
||||
'value',
|
||||
'where'
|
||||
'where',
|
||||
'zip'
|
||||
];
|
||||
|
||||
function strip(value) {
|
||||
|
||||
@@ -3513,7 +3513,7 @@
|
||||
deepEqual(actual, [['moe', 30, undefined], ['larry', 40, false]]);
|
||||
});
|
||||
|
||||
test('should be able to consume the output of `_.unzip`', function() {
|
||||
test('should correctly consume it\'s output', function() {
|
||||
var expected = [['moe', 'larry'], [30, 40]];
|
||||
deepEqual(_.unzip(_.zip(_.unzip(_.zip(expected)))), expected);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user