mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Make _.contains work with strings similar ES6 draft String#contains.
Former-commit-id: 3cfffdcddec3e1e8175da95043ec86ac3c6a85fe
This commit is contained in:
17
test/test.js
17
test/test.js
@@ -132,6 +132,23 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.contains');
|
||||
|
||||
(function() {
|
||||
_.each([
|
||||
{ 'kind': 'literal', 'value': 'abc' },
|
||||
{ 'kind': 'object', 'value': Object('abc') }
|
||||
],
|
||||
function(data) {
|
||||
test('should work with a string ' + data.kind + ' for `collection`', function() {
|
||||
equal(_.contains(data.value, 'bc'), true);
|
||||
equal(_.contains(data.value, 'd'), false);
|
||||
});
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.debounce');
|
||||
|
||||
(function() {
|
||||
|
||||
Reference in New Issue
Block a user