typegoose / typegoose/mongodb-memory-server

Refactor "forceSamePort" to use options instead of arguments

Open
#580 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature
Dominant language
TypeScript
Stars
2.8k
Forks
191
Avg merge
4h 25m
Merged PRs (30d)
10

Description

Why

Currently, there only exists the forceSamePort argument in MongoMemoryServer on .start, _startUpInstance and getStartOptions, and does not really convey how it works

How

Maybe by using options beside just port to convey forcePort (no port generation) or other behavior

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing forceSamePort through MongoMemoryServer.start, _startUpInstance, and getStartOptions, then inspect their callers to understand the current port behavior. Define the options shape that replaces the argument and verify that forced ports, generated ports, and existing call paths retain their intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, typescript
Domain
testing-qa
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.