Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

failing test for next.ok in parMap

  • Loading branch information...
commit 2763301c2a88f00bda588a0c66aa5b499041833f 1 parent 9ee4253
@substack authored
Showing with 26 additions and 0 deletions.
  1. +26 −0 test/seq.js
View
26 test/seq.js
@@ -725,3 +725,29 @@ exports.ok = function () {
})
;
};
+
+exports.nextOk = function () {
+ var to = setTimeout(function () {
+ assert.fail('seq never fired');
+ }, 500);
+
+ function moo1 (cb) { cb(3) }
+ function moo2 (cb) { cb(4) }
+
+ Seq()
+ .par_(function (next) { moo1(next.ok) })
+ .par_(function (next) { moo2(next.ok) })
+ .seq_(function (next, x, y) {
+ assert.eql(x, 3);
+ assert.eql(y, 4);
+ next.ok([ 1, 2, 3 ])
+ })
+ .parMap_(function (next, x) {
+ next.ok(x * 100)
+ })
+ .seq(function (next) {
+ clearTimeout(to);
+ assert.equal(next.stack, [ 100, 200, 300 ]);
+ })
+ ;
+};
Please sign in to comment.
Something went wrong with that request. Please try again.