Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix for the fn test

  • Loading branch information...
commit 1c25f98d14379cc772b4b0c36d3064dc1de77403 1 parent b594c6f
@substack authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 test/fn.js
View
8 test/fn.js
@@ -15,8 +15,8 @@ test('protoFn', function (t) {
});
this.x = function (f, g) {
- setTimeout(f.bind({}, 7, 8, 9), 50);
- setTimeout(g.bind({}, [ 'q', 'r' ]), 100);
+ setTimeout(f.bind({}, 7, 8, 9), 25);
+ setTimeout(g.bind({}, [ 'q', 'r' ]), 50);
};
this.y = 555;
});
@@ -56,12 +56,15 @@ test('protoFn', function (t) {
links : [],
} ]);
+ var pending = 2;
c.request('x', [
function (x, y , z) {
t.deepEqual([ x, y, z ], [ 7, 8, 9 ]);
+ if (--pending === 0) t.end();
},
function (qr) {
t.deepEqual(qr, [ 'q', 'r' ]);
+ if (--pending === 0) t.end();
}
]);
@@ -76,7 +79,6 @@ test('protoFn', function (t) {
t.ok(err.stack);
t.ok(err.message.match(/^Error parsing JSON/));
t.ok(err instanceof SyntaxError);
- t.end();
});
c.parse('{');
});
Please sign in to comment.
Something went wrong with that request. Please try again.