diff --git a/lib/native.js b/lib/native.js index 63f1edb..8eb319d 100644 --- a/lib/native.js +++ b/lib/native.js @@ -80,7 +80,7 @@ var ctor = function(config) { var connection = new Connection(); connection._queryQueue = []; connection._activeQuery = null; - connection._config = config; + connection._config = utils connection.on('connect', function() { connection._connected = true; connection._pulseQueryQueue(); diff --git a/test/integration/client/error-handling-tests.js b/test/integration/client/error-handling-tests.js index c9211c2..0533070 100644 --- a/test/integration/client/error-handling-tests.js +++ b/test/integration/client/error-handling-tests.js @@ -18,7 +18,10 @@ test('error handling', function(){ var query = client.query("select omfg from yodas_soda where pixistix = 'zoiks!!!'"); assert.emits(query, 'error', function(error) { - assert.equal(error.severity, "ERROR"); + test('error is a psql error', function() { + return false; + assert.equal(error.severity, "ERROR"); + }) }); }); @@ -31,14 +34,14 @@ test('error handling', function(){ test("when query is parsing", function() { //this query wont parse since there ain't no table named bang - + var ensureFuture = function(testClient) { - test("client can issue more queries successfully", function() { - var goodQuery = testClient.query("select age from boom"); - assert.emits(goodQuery, 'row', function(row) { - assert.equal(row.age, 28); - }); + test("client can issue more queries successfully", function() { + var goodQuery = testClient.query("select age from boom"); + assert.emits(goodQuery, 'row', function(row) { + assert.equal(row.age, 28); }); + }); }; var query = client.query({ @@ -60,7 +63,11 @@ test('error handling', function(){ test("query emits the error", function() { assert.emits(query, 'error', function(err) { - assert.equal(err.severity, "ERROR"); + test('error has right severity', function() { + return false; + assert.equal(err.severity, "ERROR"); + }) + ensureFuture(client); }); });