fixing broken _.breakLoop test -- implementation was fine, test was out of date.

This commit is contained in:
Jeremy Ashkenas
2009-11-12 21:31:03 -05:00
parent b5e1101610
commit 80939448a7

View File

@@ -8,7 +8,7 @@ $(document).ready(function() {
}); });
var answer = null; var answer = null;
_.each([1, 2, 3], function(num){ if ((answer = num) == 2) throw '__break__'; }); _.each([1, 2, 3], function(num){ if ((answer = num) == 2) _.breakLoop(); });
equals(answer, 2, 'the loop broke in the middle'); equals(answer, 2, 'the loop broke in the middle');
var answers = []; var answers = [];