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.

20 lines
428 B

12 years ago
  1. var common = require('../../common');
  2. var connection = common.createConnection();
  3. var assert = require('assert');
  4. connection.connect();
  5. var got_drain = false;
  6. connection.on('drain', function() {
  7. got_drain = true;
  8. });
  9. connection.query("SELECT 1", function(err) {
  10. assert.equal(got_drain, false);
  11. assert.ok(!err);
  12. process.nextTick(function() {
  13. assert.equal(got_drain, true);
  14. connection.end();
  15. });
  16. });