Skip to content

Commit

Permalink
Update connection.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
IslandRhythms committed Feb 7, 2024
1 parent 8e1f5ef commit 9f0b13e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/connection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1554,8 +1554,11 @@ describe('connections:', function() {
assert.deepEqual(m.connections.length, 0);
});
it('should demonstrate the withSession() function (gh-14330)', async function() {
if (!process.env.REPLICA_SET && !process.env.START_REPLICA_SET) {
this.skip();
}
const m = new mongoose.Mongoose();
await m.connect(/* put mongodb connection string here */);
m.connect(start.uri);
const res = await m.connection.withSession({}, async() => { return new Promise((resolve, reject) => { return resolve('ok');});});

Check failure on line 1562 in test/connection.test.js

View workflow job for this annotation

GitHub Actions / Lint JS-Files

'reject' is defined but never used

Check failure on line 1562 in test/connection.test.js

View workflow job for this annotation

GitHub Actions / Lint JS-Files

'reject' is defined but never used
assert.ok(res);
});
Expand Down

0 comments on commit 9f0b13e

Please sign in to comment.