mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-15 13:17:50 +00:00
fixing broken _.breakLoop test -- implementation was fine, test was out of date.
This commit is contained in:
@@ -8,7 +8,7 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
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');
|
||||
|
||||
var answers = [];
|
||||
|
||||
Reference in New Issue
Block a user