mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Realign _.assign and _.defaults with ES6 Object.assign. [closes #259]
Former-commit-id: e8c89e4a130ed286ce07e1a2e848f50b182effae
This commit is contained in:
22
test/test.js
22
test/test.js
@@ -706,19 +706,21 @@
|
||||
deepEqual(func({}, new Foo), {});
|
||||
});
|
||||
|
||||
test('lodash.' + methodName + ' should treat sparse arrays as dense', function() {
|
||||
var array = Array(3);
|
||||
array[0] = 1;
|
||||
array[2] = 3;
|
||||
if (methodName == 'merge') {
|
||||
test('lodash.' + methodName + ' should treat sparse arrays as dense', function() {
|
||||
var array = Array(3);
|
||||
array[0] = 1;
|
||||
array[2] = 3;
|
||||
|
||||
var actual = func([], array),
|
||||
expected = array.slice();
|
||||
var actual = func([], array),
|
||||
expected = array.slice();
|
||||
|
||||
expected[1] = undefined;
|
||||
expected[1] = undefined;
|
||||
|
||||
ok(1 in actual);
|
||||
deepEqual(actual, expected);
|
||||
});
|
||||
ok(1 in actual);
|
||||
deepEqual(actual, expected);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user