Update connect method on mongo 5

This commit is contained in:
Renan Castro
2021-12-07 21:07:58 -03:00
committed by Filipe Névola
parent 158b9668df
commit af05771a41
2 changed files with 4 additions and 3 deletions

View File

@@ -190,9 +190,10 @@ MongoConnection = function (url, options) {
var connectFuture = new Future;
MongoDB.connect(
new MongoDB.MongoClient(
url,
mongoOptions,
mongoOptions
).connect(
Meteor.bindEnvironment(
function (err, client) {
if (err) {

View File

@@ -3318,7 +3318,7 @@ Meteor.isServer && Tinytest.add("mongo-livedata - npm modules", function (test)
var c = new Mongo.Collection(Random.id());
var rawCollection = c.rawCollection();
test.isTrue(rawCollection);
test.isTrue(rawCollection.findAndModify);
test.isTrue(rawCollection.findOneAndUpdate);
var rawDb = c.rawDatabase();
test.isTrue(rawDb);
test.isTrue(rawDb.admin);