mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Use isEven in _.remove test.
This commit is contained in:
@@ -18997,11 +18997,8 @@
|
|||||||
QUnit.test('should modify the array and return removed elements', function(assert) {
|
QUnit.test('should modify the array and return removed elements', function(assert) {
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
|
|
||||||
var array = [1, 2, 3, 4];
|
var array = [1, 2, 3, 4],
|
||||||
|
actual = _.remove(array, isEven);
|
||||||
var actual = _.remove(array, function(n) {
|
|
||||||
return n % 2 == 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
assert.deepEqual(array, [1, 3]);
|
assert.deepEqual(array, [1, 3]);
|
||||||
assert.deepEqual(actual, [2, 4]);
|
assert.deepEqual(actual, [2, 4]);
|
||||||
|
|||||||
Reference in New Issue
Block a user