Open LinusU opened 3 years ago
from 7.x.x versions MongoMemoryServer instance have to starts manually:
mongod = new MongoMemoryServer();
await mongod.start();
const mongoUri = mongo.getUri();
await mongoose.connect(mongoUri, {
useCreateIndex: true,
useNewUrlParser: true,
useUnifiedTopology: true
});
Hey, thanks for posting this issue! I personally hold mongodb-memory-server
to version 6.x because of the same reasons as you, so this is definitely something I am interested in fixing. Just got to find the time. Would be happy to accept a PR too if you have the inclination.
Potentially related (or not), I have an old branch with some work to support replicasets. Not sure if mongodb-memory-server
7.x makes this any easier, need to explore that when the time comes.
Hi there! Created a PR that should squash all the deprecations at once, including this one. Would appreciate a review! https://github.com/lirbank/jest-environment-mongodb/pull/28
Version 7.x added support for my platform (arm64), but it doesn't seem like we are compatible with version 7.x yet. I'm getting the following error:
related: https://github.com/nodkz/mongodb-memory-server/issues/213