summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBrian Maissy <brian.maissy@gmail.com>2013-03-03 00:50:47 +0200
committerBrian Maissy <brian.maissy@gmail.com>2013-03-03 00:50:47 +0200
commit4ffed0451258ec1b1a95e911ee84a6a426cc5321 (patch)
tree5162432c5e94d886f63e62a9dba3aaa3b1658ab3 /test
parent4a8099777ec6a5bc1d6fc1a2060cfb651bbd4ccc (diff)
downloadasync-4ffed0451258ec1b1a95e911ee84a6a426cc5321.tar.gz
calling waterfall with a non-array first argument results in an error
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-async.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test-async.js b/test/test-async.js
index 1caf1bc..62e0643 100755
--- a/test/test-async.js
+++ b/test/test-async.js
@@ -360,6 +360,13 @@ exports['waterfall empty array'] = function(test){
});
};
+exports['waterfall non-array'] = function(test){
+ async.waterfall({}, function(err){
+ test.equals(err.message, 'First argument to waterfall must be an array of functions');
+ test.done();
+ });
+};
+
exports['waterfall no callback'] = function(test){
async.waterfall([
function(callback){callback();},