[Pkg-javascript-commits] [node-async] 410/480: added test for inverted sort order

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:47 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-async.

commit 199c205dd9052c4ac0bf47501598a906d63dd444
Author: zaphod1984 <zaphod84 at gmx.de>
Date:   Thu Feb 16 21:04:18 2012 +0100

    added test for inverted sort order
---
 test/test-async.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/test-async.js b/test/test-async.js
index 518650f..b21b04f 100755
--- a/test/test-async.js
+++ b/test/test-async.js
@@ -1508,6 +1508,15 @@ exports['sortBy'] = function(test){
     });
 };
 
+exports['sortBy inverted'] = function(test){
+    async.sortBy([{a:1},{a:15},{a:6}], function(x, callback){
+        setTimeout(function(){callback(null, x.a*-1);}, 0);
+    }, function(err, result){
+        test.same(result, [{a:15},{a:6},{a:1}]);
+        test.done();
+    });
+};
+
 exports['apply'] = function(test){
     test.expect(6);
     var fn = function(){

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git



More information about the Pkg-javascript-commits mailing list