mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Add _.match.
This commit is contained in:
21
test/test.js
21
test/test.js
@@ -5084,6 +5084,23 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.match');
|
||||
|
||||
(function() {
|
||||
test('should create a function that performs a deep comparison between a given object and the `props` object', 3, function() {
|
||||
var object = { 'a': 1, 'b': 2 },
|
||||
actual = _.match({ 'a': 1 });
|
||||
|
||||
equal(actual.length, 1);
|
||||
strictEqual(actual(object), true);
|
||||
|
||||
actual = _.match({ 'b': 1 });
|
||||
strictEqual(actual(object), false);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.max');
|
||||
|
||||
(function() {
|
||||
@@ -8082,6 +8099,8 @@
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.where');
|
||||
|
||||
(function() {
|
||||
@@ -8732,7 +8751,7 @@
|
||||
|
||||
var acceptFalsey = _.difference(allMethods, rejectFalsey);
|
||||
|
||||
test('should accept falsey arguments', 157, function() {
|
||||
test('should accept falsey arguments', 158, function() {
|
||||
var emptyArrays = _.map(falsey, function() { return []; }),
|
||||
isExposed = '_' in root,
|
||||
oldDash = root._;
|
||||
|
||||
Reference in New Issue
Block a user