Browse files

just process.exit() on the ws test

  • Loading branch information...
1 parent 78c9e93 commit af94d75edf142b7f3625608f178350d6b85459a3 @substack committed Mar 21, 2013
Showing with 5 additions and 6 deletions.
  1. +5 −6 test/ws.js
View
11 test/ws.js
@@ -5,6 +5,11 @@ var wc = require('wsclient');
test('ws', function (t) {
t.plan(4);
+ t.on('end', function () {
+ s0.close();
+ s1.close();
+ setTimeout(process.exit, 100); // whatever
+ });
var p0 = Math.floor(Math.random() * (Math.pow(2,16) - 1e4) + 1e4);
var s0 = ws.createServer();
@@ -39,12 +44,6 @@ test('ws', function (t) {
}, 15);
});
- c.on('close', function () {
- s0.close();
- s1.close();
- t.end();
- });
-
var msgs = [ 'ytipeeb', 'poob' ];
c.on('message', function (buf) {
t.equal(buf.toString(), msgs.shift());

0 comments on commit af94d75

Please sign in to comment.