From 548fe881d69a81a13b7ca40331a05fac5fcf7e76 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 28 Feb 2016 20:05:54 -0800 Subject: [PATCH] Add `_.pullAllWith` comparator test. --- test/test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/test.js b/test/test.js index ea2d97db6..dc8aa1705 100644 --- a/test/test.js +++ b/test/test.js @@ -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) {