mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 20:37:48 +00:00
Update vendors.
Former-commit-id: 55a30b9cbfe7c513dd13d709aa4552fe715c262b
This commit is contained in:
8
vendor/underscore/test/collections.js
vendored
8
vendor/underscore/test/collections.js
vendored
@@ -260,6 +260,14 @@ $(document).ready(function() {
|
||||
equal(result[0].a, 1);
|
||||
});
|
||||
|
||||
test('findWhere', function() {
|
||||
var list = [{a: 1, b: 2}, {a: 2, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}, {a: 2, b: 4}];
|
||||
var result = _.findWhere(list, {a: 1});
|
||||
deepEqual(result, {a: 1, b: 2});
|
||||
result = _.findWhere(list, {b: 4});
|
||||
deepEqual(result, {a: 1, b: 4});
|
||||
});
|
||||
|
||||
test('max', function() {
|
||||
equal(3, _.max([1, 2, 3]), 'can perform a regular Math.max');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user