Skip to content

Commit 6f0133a

Browse files
committedMar 25, 2021
removed comments
1 parent 7a93c16 commit 6f0133a

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed
 

‎lib/connection.js

-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ const parseConnectionString = require('mongodb/lib/core').parseConnectionString;
2525
const arrayAtomicsSymbol = require('./helpers/symbols').arrayAtomicsSymbol;
2626
const sessionNewDocuments = require('./helpers/symbols').sessionNewDocuments;
2727

28-
// let id = 0;
29-
3028
/*!
3129
* A list of authentication mechanisms that don't require a password for authentication.
3230
* This is used by the authMechanismDoesNotRequirePassword method.
@@ -70,7 +68,6 @@ function Connection(base) {
7068
this._closeCalled = false;
7169
this._hasOpened = false;
7270
this.plugins = [];
73-
// this.id = id++;
7471
if (typeof base === 'undefined' || !base.connections.length) {
7572
this.id = 0;
7673
} else {

‎test/connection.test.js

-5
Original file line numberDiff line numberDiff line change
@@ -1301,15 +1301,10 @@ describe('connections:', function() {
13011301
});
13021302
it('Connection id should be scoped per Mongoose Instance (gh-10025)', function() {
13031303
const m = new mongoose.Mongoose;
1304-
// console.log('First Instance', m.connection.id); // should be x
13051304
const conn = m.createConnection();
1306-
// console.log(conn.id); // should be x + 1
13071305
const m1 = new mongoose.Mongoose;
1308-
// console.log('Second Instance', m1.connection.id); // should be y
13091306
const conn2 = m1.createConnection();
1310-
// console.log(conn2.id); // should be y + 1;
13111307
const conn3 = m.createConnection();
1312-
// console.log('Back to First Instance', conn3.id); // should be x + 2
13131308
assert.deepStrictEqual(m.connection.id, 0);
13141309
assert.deepStrictEqual(conn.id, m.connection.id + 1);
13151310
assert.deepStrictEqual(m1.connection.id, 0);

0 commit comments

Comments
 (0)
Please sign in to comment.