diff options
Diffstat (limited to 'test/test-async.js')
-rwxr-xr-x | test/test-async.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/test-async.js b/test/test-async.js index 2fe11bd..670d14a 100755 --- a/test/test-async.js +++ b/test/test-async.js @@ -387,6 +387,26 @@ exports['seq binding'] = function (test) { }); }; +exports['seq without callback'] = function (test) { + test.expect(2); + var testcontext = {name: 'foo'}; + + var add2 = function (n, cb) { + test.equal(this, testcontext); + setTimeout(function () { + cb(null, n + 2); + }, 50); + }; + var mul3 = function () { + test.equal(this, testcontext); + setTimeout(function () { + test.done(); + }, 15); + }; + var add2mul3 = async.seq(add2, mul3); + add2mul3.call(testcontext, 3); +}; + exports['auto'] = function(test){ var callOrder = []; async.auto({ |