jest-mongodb
jest-mongodb copied to clipboard
Need to update the documentation to reflect current 'mongodb' library
The command
connection = await MongoClient.connect(global.__MONGO_URI__, {
useNewUrlParser: true,
useUnifiedTopology: true,
});
has been deprecated. The useNewUrlParserand useUnifiedTopology were removed from the MongoClientOptions as per the explanation given by MongoDb
https://www.mongodb.com/community/forums/t/argument-of-type-usenewurlparser-boolean-useunifiedtopology-boolean-is-not-assignable-to-parameter-of-type/169033/3
Therefore, it is recommended to update this library's documentation to avoid other users to struggle. Cheers RS
Strongly agree. I've lost a decent amount of time trying to find a workaround! An update to the library's documentation should be included in jest-mongodb
The README also refers to MongoClient.close() which no longer exists, due to which I don't know how to do a teardown.