mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Fix _.compose unit test.
This commit is contained in:
11
test/test.js
11
test/test.js
@@ -4647,16 +4647,11 @@
|
|||||||
func = _[methodName];
|
func = _[methodName];
|
||||||
|
|
||||||
_.forEach(falsey, function(value, index) {
|
_.forEach(falsey, function(value, index) {
|
||||||
var pass = false;
|
var pass = !index && methodName == 'compose';
|
||||||
try {
|
try {
|
||||||
if (index) {
|
index ? func(value) : func();
|
||||||
func(value);
|
|
||||||
} else {
|
|
||||||
func();
|
|
||||||
pass = methodName == 'compose';
|
|
||||||
}
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
pass = true;
|
pass = !pass;
|
||||||
}
|
}
|
||||||
actual.push(pass);
|
actual.push(pass);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user