typegoose / mongodb-memory-server

Manage & spin up mongodb server binaries with zero(or slight) configuration for tests.
https://typegoose.github.io/mongodb-memory-server/
MIT License
2.58k stars 187 forks source link

Change `forceSamePort` parameter to also be a config option #816

Closed hasezoey closed 3 months ago

hasezoey commented 1 year ago

Currently forceSamePort can only be set via the MongoMemoryServer.start parameter, and is currently unavailable for .create or replsets, this issue tracks to add some kind of option to InstanceOpts to force the same port.

Note about semantics: it will work the same as forceSamePort, where the parameter takes priority. if set to true and port is defined, it will not generate a port, port is undefined, it will generate a port regardless.

github-actions[bot] commented 3 months ago

:tada: This issue has been resolved in version 10.0.0-beta.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 3 months ago

:tada: This issue has been resolved in version 10.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: