mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Remove custom rearg for update.
This commit is contained in:
committed by
John-David Dalton
parent
b40b555386
commit
ff7d79d5fc
@@ -142,7 +142,6 @@ exports.methodRearg = {
|
|||||||
'setWith': [3, 1, 2, 0],
|
'setWith': [3, 1, 2, 0],
|
||||||
'sortedIndexBy': [2, 1, 0],
|
'sortedIndexBy': [2, 1, 0],
|
||||||
'sortedLastIndexBy': [2, 1, 0],
|
'sortedLastIndexBy': [2, 1, 0],
|
||||||
'update': [2, 1, 0],
|
|
||||||
'zipWith': [1, 2, 0]
|
'zipWith': [1, 2, 0]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -697,7 +697,7 @@
|
|||||||
assert.deepEqual(actual, { 'a': { 'c': 3 } }, 'fp.unset');
|
assert.deepEqual(actual, { 'a': { 'c': 3 } }, 'fp.unset');
|
||||||
|
|
||||||
value = _.cloneDeep(deepObject);
|
value = _.cloneDeep(deepObject);
|
||||||
actual = fp.update(function(x) { return x + 1; })('a.b')(value);
|
actual = fp.update('a.b')(function(x) { return x + 1; })(value);
|
||||||
|
|
||||||
assert.deepEqual(value, deepObject, 'fp.update');
|
assert.deepEqual(value, deepObject, 'fp.update');
|
||||||
assert.deepEqual(actual, { 'a': { 'b': 3, 'c': 3 } }, 'fp.update');
|
assert.deepEqual(actual, { 'a': { 'b': 3, 'c': 3 } }, 'fp.update');
|
||||||
@@ -773,7 +773,7 @@
|
|||||||
assert.strictEqual(actual.d, value.d, 'fp.unset');
|
assert.strictEqual(actual.d, value.d, 'fp.unset');
|
||||||
|
|
||||||
value = _.cloneDeep(object);
|
value = _.cloneDeep(object);
|
||||||
actual = fp.update(function(x) { return { 'c2': 2 }; }, 'a.b', value);
|
actual = fp.update('a.b', function(x) { return { 'c2': 2 }; }, value);
|
||||||
assert.strictEqual(actual.d, value.d, 'fp.update');
|
assert.strictEqual(actual.d, value.d, 'fp.update');
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|||||||
Reference in New Issue
Block a user