Skip to content

Commit 35a9a70

Browse files
committed
test: Fix deprecation warning with mongoose open() method
1 parent 1769d0a commit 35a9a70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/__mocks__/mongooseCommon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mongoose.connect = async () => {
1414

1515
const mongoUri = await mongoServer.getConnectionString();
1616

17-
originalConnect.bind(mongoose)(mongoUri);
17+
originalConnect.bind(mongoose)(mongoUri, { useMongoClient: true });
1818

1919
mongoose.connection.on('error', e => {
2020
if (e.message.code === 'ETIMEDOUT') {

0 commit comments

Comments
 (0)