mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Add test for custom _.indexOf methods, _.contains, and objects.
This commit is contained in:
@@ -3688,14 +3688,15 @@
|
|||||||
return new Foo;
|
return new Foo;
|
||||||
});
|
});
|
||||||
|
|
||||||
test('`_.contains` should work with a custom `_.indexOf` method', 1, function() {
|
test('`_.contains` should work with a custom `_.indexOf` method', 2, function() {
|
||||||
if (!isModularize) {
|
if (!isModularize) {
|
||||||
_.indexOf = custom;
|
_.indexOf = custom;
|
||||||
ok(_.contains(array, new Foo));
|
ok(_.contains(array, new Foo));
|
||||||
|
ok(_.contains({ 'a': 1, 'b': new Foo, 'c': 3 }, new Foo));
|
||||||
_.indexOf = indexOf;
|
_.indexOf = indexOf;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skipTest();
|
skipTest(2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user