Skip to content

Commit e1dbc2b

Browse files
committed
fix promise argiments
1 parent c426924 commit e1dbc2b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/integration/promise-wrappers/test-promise-wrappers.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ function testErrors() {
6767
return connResolved.query('select 2+2 as qqq');
6868
})
6969
.catch(function(err) {
70-
console.log(err);
7170
exceptionCaught = true;
7271
if (connResolved) {
7372
connResolved.end();
@@ -278,7 +277,8 @@ function testChangeUser() {
278277
.then(function() {
279278
return connResolved.query('select current_user()');
280279
})
281-
.then(function(rows) {
280+
.then(function(result) {
281+
const [rows, fields] = result;
282282
assert.deepEqual(onlyUsername(rows[0]['current_user()']), 'changeuser1');
283283
return connResolved.changeUser({
284284
user: 'changeuser2',
@@ -288,7 +288,8 @@ function testChangeUser() {
288288
.then(function() {
289289
return connResolved.query('select current_user()');
290290
})
291-
.then(function(rows) {
291+
.then(function(result) {
292+
const [rows, fields] = result;
292293
assert.deepEqual(onlyUsername(rows[0]['current_user()']), 'changeuser2');
293294
return connResolved.changeUser({
294295
user: 'changeuser1',
@@ -301,7 +302,8 @@ function testChangeUser() {
301302
.then(function() {
302303
return connResolved.query('select current_user()');
303304
})
304-
.then(function(rows) {
305+
.then(function(result) {
306+
const [rows, fields] = result;
305307
assert.deepEqual(onlyUsername(rows[0]['current_user()']), 'changeuser1');
306308
doneChangeUser = true;
307309
return connResolved.end();

0 commit comments

Comments
 (0)