A Twitch.tv viewer reward and games system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
520 B

var common = require('../../common');
var connection = common.createConnection();
var assert = require('assert');
connection.connect();
var gotEnd = false;
connection.on('end', function(err) {
assert.equal(gotEnd, false);
assert.ok(!err);
gotEnd = true;
});
var gotCallback = false;
connection.end(function(err) {
if (err) throw err;
assert.equal(gotCallback, false);
gotCallback = true;
});
process.on('exit', function() {
assert.equal(gotCallback, true);
assert.equal(gotEnd, true);
});