From 403ea0a0e14b03f999ba41ff246c59246b23ceb5 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 18 Sep 2013 01:20:08 -0700 Subject: [PATCH] Fix `_.compose` unit test. --- test/test.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/test.js b/test/test.js index aef4109f1..f84574d0d 100644 --- a/test/test.js +++ b/test/test.js @@ -4647,16 +4647,11 @@ func = _[methodName]; _.forEach(falsey, function(value, index) { - var pass = false; + var pass = !index && methodName == 'compose'; try { - if (index) { - func(value); - } else { - func(); - pass = methodName == 'compose'; - } + index ? func(value) : func(); } catch(e) { - pass = true; + pass = !pass; } actual.push(pass); });