mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
stricter ECMA5 compliance. _.every now requires an iterator to be passed. #160
This commit is contained in:
@@ -123,12 +123,12 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
test('collections: all', function() {
|
||||
ok(_.all([]), 'the empty set');
|
||||
ok(_.all([true, true, true]), 'all true values');
|
||||
ok(!_.all([true, false, true]), 'one false value');
|
||||
ok(_.all([], _.identity), 'the empty set');
|
||||
ok(_.all([true, true, true], _.identity), 'all true values');
|
||||
ok(!_.all([true, false, true], _.identity), 'one false value');
|
||||
ok(_.all([0, 10, 28], function(num){ return num % 2 == 0; }), 'even numbers');
|
||||
ok(!_.all([0, 11, 28], function(num){ return num % 2 == 0; }), 'an odd number');
|
||||
ok(_.every([true, true, true]), 'aliased as "every"');
|
||||
ok(_.every([true, true, true], _.identity), 'aliased as "every"');
|
||||
});
|
||||
|
||||
test('collections: any', function() {
|
||||
|
||||
Reference in New Issue
Block a user