Skip to content

Commit

Permalink
Merge pull request #4 from iamstolis/patch-1
Browse files Browse the repository at this point in the history
Function in "sort with a function" test should be a comparator
  • Loading branch information
doowb authored Jul 24, 2017
2 parents 2db2ea2 + fe0290f commit 62f225d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('arraySort', function() {
var arr = [{key: 'y'}, {key: 'z'}, {key: 'x'}];

var actual = arraySort(arr, function(a, b) {
return a.key > b.key;
return a.key < b.key ? -1 : (a.key > b.key ? 1 : 0);
});

actual.should.eql([
Expand Down

0 comments on commit 62f225d

Please sign in to comment.