mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Ensure _.every returns false as soon as the callback result is falsey.
Former-commit-id: d5488688c4a30376999b04ba80f1551af403b516
This commit is contained in:
21
test/test.js
21
test/test.js
@@ -348,6 +348,16 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.every');
|
||||
|
||||
(function() {
|
||||
test('should return `false` as soon as the `callback` result is falsey', function() {
|
||||
equal(_.every([true, null, true], _.identity), false);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.extend');
|
||||
|
||||
(function() {
|
||||
@@ -1393,6 +1403,17 @@
|
||||
});
|
||||
}(1, 2, 3));
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.some');
|
||||
|
||||
(function() {
|
||||
test('should return `true` as soon as the `callback` result is truthy', function() {
|
||||
equal(_.some([null, true, null], _.identity), true);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.sortBy');
|
||||
|
||||
Reference in New Issue
Block a user