This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
[Feature request] Add unit / local test suite that uses in-memory MongoDB #133
Open
Description
I think currently all tests depend on an actual MongoDB instance to run - this is great for end-to-end tests which make sure everything is fine.
However I wonder if we could also add a local test suite which would test the app in a similar way but connecting to an in-memory mongoDB instead. (e.g. this mongodb-memory-server seems to be quite promising according to the official instructions in Jest)
The pros are:
- in our tests we would not have to worry about the DB external dependency
- we do not have to maintain the database state manually as the data will be gone once the in memory db is torn down
- the projects and the tests become more standalone
The cons are (maybe):
- the test setup is exactly the same as in Production
- the tests would depend on the in-memory DB library
Or please let me know if there is any reason I had missed. :-)
And thanks so much for the great work of this starter repo. 👍
Metadata
Metadata
Assignees
Labels
No labels