Skip to content

Commit

Permalink
Add test for PromiseConnection properties
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorr committed Aug 6, 2019
1 parent d733583 commit 004a5e4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/integration/promise-wrappers/test-promise-wrappers.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,24 @@ function testChangeUser() {
});
}

function testConnectionProperties() {
let connResolved;
createConnection(config)
.then(conn => {
connResolved = conn;
assert.equal(typeof conn.config, 'object');
assert.ok('queryFormat' in conn.config);
assert.equal(typeof conn.threadId, 'number');
return connResolved.end();
})
.catch(err => {
if (connResolved) {
connResolved.end();
}
throw err;
});
}

function timebomb(fuse) {
let timebomb;

Expand Down Expand Up @@ -434,6 +452,7 @@ testErrorsPool();
testObjParamsPool();
testEventsPool();
testChangeUser();
testConnectionProperties();
testPoolConnectionDestroy();
testPromiseLibrary();

Expand Down

0 comments on commit 004a5e4

Please sign in to comment.