Add _.match.

This commit is contained in:
John-David Dalton
2013-12-22 23:23:14 -06:00
parent 99fac3ae1c
commit 990e73fce6
9 changed files with 574 additions and 408 deletions

View File

@@ -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._;