diff --git a/lib/mongodb.js b/lib/mongodb.js index 5f7972269..0f11f8be4 100644 --- a/lib/mongodb.js +++ b/lib/mongodb.js @@ -22,7 +22,6 @@ const ObjectIdValueRegex = /^[0-9a-fA-F]{24}$/; const ObjectIdTypeRegex = /objectid/i; exports.ObjectID = ObjectID; -exports.ObjectId = ObjectID; /*! * Convert the id to be a BSON ObjectID if it is compatible * @param {*} id The id value @@ -284,8 +283,6 @@ MongoDB.prototype.connect = function(callback) { 'validateOptions', 'appname', 'auth', - // 'user', // no longer supported, only in `auth` - // 'password', // no longer supported , only in `auth` 'authMechanism', 'compression', 'readPreferenceTags', diff --git a/test/mongodb.test.js b/test/mongodb.test.js index 701f16953..e4aa283ed 100644 --- a/test/mongodb.test.js +++ b/test/mongodb.test.js @@ -127,22 +127,14 @@ describe('connect', function() { if (err) return done(err); const id = success.insertedId; ds.connector.should.have.property('db'); - // [NOTE] Now isDestroyed is completly removed at v4+ driver versions, - // see https://mongodb.github.io/node-mongodb-native/3.6/reference/unified-topology/ - // ds.connector.db.should.have.property('topology'); - // ds.connector.db.topology.should.have.property('isDestroyed'); - // ds.connector.db.topology.isDestroyed().should.be.False(); + ds.connector.disconnect(function(err) { if (err) return done(err); - // [NOTE] isDestroyed() is not implemented by NativeTopology - // When useUnifiedTopology is true - // ds.connector.db.topology.isDestroyed().should.be.True(); ds.connector.execute('TestLazy', 'findOne', {_id: id}, function( err, data, ) { if (err) return done(err); - // ds.connector.db.topology.isDestroyed().should.be.False(); done(); }); });