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.

35 lines
789 B

12 years ago
  1. var common = require('../../common');
  2. var connection = common.createConnection({
  3. port : common.fakeServerPort,
  4. password : 'oldpw',
  5. insecureAuth : true,
  6. });
  7. var assert = require('assert');
  8. var server = common.createFakeServer();
  9. var connected;
  10. server.listen(common.fakeServerPort, function(err) {
  11. if (err) throw err;
  12. connection.connect(function(err, result) {
  13. if (err) throw err;
  14. connected = result;
  15. connection.destroy();
  16. server.destroy();
  17. });
  18. });
  19. server.on('connection', function(incomingConnection) {
  20. incomingConnection.handshake({
  21. user : connection.config.user,
  22. password : connection.config.password,
  23. oldPassword : true,
  24. });
  25. });
  26. process.on('exit', function() {
  27. assert.equal(connected.fieldCount, 0);
  28. });