Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

discard empty sort(fort.{ascend,descend}) case

  • Loading branch information...
commit 936553dbfa9b3d136999b8c380476b190e5ddf19 1 parent d177970
@substack authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/cmp.js
View
4 test/cmp.js
@@ -2,7 +2,7 @@ var test = require('tap').test;
var fort = require('../');
test('ascend', function (t) {
- t.same([4,1,3,2].sort(fort.ascend), [1,2,3,4], 'identity');
+ t.same([4,1,3,2].sort(fort.ascend()), [1,2,3,4], 'identity');
t.same(
[4,1,3,2].sort(fort.ascend(function (x) { return x % 4 })),
[4,1,2,3],
@@ -19,7 +19,7 @@ test('ascend', function (t) {
});
test('descend', function (t) {
- t.same([4,1,3,2].sort(fort.descend), [4,3,2,1], 'identity');
+ t.same([4,1,3,2].sort(fort.descend()), [4,3,2,1], 'identity');
t.same(
[4,1,3,2].sort(fort.descend(function (x) { return x % 4 })),
[3,2,1,4],
Please sign in to comment.
Something went wrong with that request. Please try again.