test-implicit-connect.js 332 B

1234567891011121314151617
  1. var common = require('../../common');
  2. var connection = common.createConnection();
  3. var assert = require('assert');
  4. var rows = undefined;
  5. connection.query('SELECT 1', function(err, _rows) {
  6. if (err) throw err;
  7. rows = _rows;
  8. });
  9. connection.end();
  10. process.on('exit', function() {
  11. assert.deepEqual(rows, [{1: 1}]);
  12. });