Skip to content

Commit

Permalink
corrections to tests for _.find as requested by @braddunbar
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed May 26, 2012
1 parent e162a68 commit 6eb19ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ $(document).ready(function() {
equal(_.reduceRight([], function(){}, undefined), undefined, 'undefined can be passed as a special case');
raises(function() { _.reduceRight([], function(){}); }, TypeError, 'throws an error for empty arrays with no initial value');
});

test('collections: find', function() {
var array = [1, 2, 3, 4];
equal(3, _.find(array, function(n) { return n > 2; }), 'should return first found `value`');
equal(void 0, _.find(array, function() { return false; }), 'should return `undefined` if `value` is not found');
strictEqual(_.find(array, function(n) { return n > 2; }), 3, 'should return first found `value`');
strictEqual(_.find(array, function() { return false; }), void 0, 'should return `undefined` if `value` is not found');
});

test('collections: detect', function() {
Expand Down

0 comments on commit 6eb19ac

Please sign in to comment.