mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
Add test for custom _.indexOf methods, _.contains, and objects.
This commit is contained in:
@@ -3688,14 +3688,15 @@
|
||||
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) {
|
||||
_.indexOf = custom;
|
||||
ok(_.contains(array, new Foo));
|
||||
ok(_.contains({ 'a': 1, 'b': new Foo, 'c': 3 }, new Foo));
|
||||
_.indexOf = indexOf;
|
||||
}
|
||||
else {
|
||||
skipTest();
|
||||
skipTest(2);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user