Add _.pullAllWith comparator test.

This commit is contained in:
John-David Dalton
2016-02-28 20:05:54 -08:00
parent b560b7047b
commit 548fe881d6

View File

@@ -16807,6 +16807,22 @@
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.pullAllWith');
(function() {
QUnit.test('should work with a `comparator` argument', function(assert) {
assert.expect(1);
var objects = [{ 'x': 1, 'y': 1 }, { 'x': 2, 'y': 2 }, { 'x': 3, 'y': 3 }],
expected = [objects[0], objects[2]],
actual = _.pullAllWith(objects, [{ 'x': 2, 'y': 2 }], lodashStable.isEqual);
assert.deepEqual(actual, expected);
});
}());
/*--------------------------------------------------------------------------*/
QUnit.module('pull methods');
lodashStable.each(['pull', 'pullAll', 'pullAllWith'], function(methodName) {