mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Add _.pullAllWith comparator test.
This commit is contained in:
16
test/test.js
16
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');
|
QUnit.module('pull methods');
|
||||||
|
|
||||||
lodashStable.each(['pull', 'pullAll', 'pullAllWith'], function(methodName) {
|
lodashStable.each(['pull', 'pullAll', 'pullAllWith'], function(methodName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user