further along with the HTML documentation

This commit is contained in:
Jeremy Ashkenas
2009-10-26 21:11:19 -04:00
parent 4c41af41e6
commit 25d3177bd7
3 changed files with 59 additions and 28 deletions

View File

@@ -100,7 +100,7 @@ $(document).ready(function() {
test('collections: sortedIndex', function() {
var numbers = [10, 20, 30, 40, 50], num = 35;
var index = _.sortedIndex(numbers, function(a, b) { return a < b ? -1 : a > b ? 1 : 0; }, num);
var index = _.sortedIndex(numbers, num);
equals(index, 3, '35 should be inserted at index 3');
});