DEV Community

Discussion on: Setup in-memory database for testing Node.js and Mongoose

Collapse
 
parveen99 profile image
parveen99

Hi great article. My project is also very similar. How can I learn how to write unit tests using mongo in memory server. Its my first time writing unit tests as a developer.

Collapse
 
ryuuto829 profile image
Dmytro Rykhlyk • Edited

Thank you!
It's hard for me to give you some concrete advice, I'm still learning how to write tests :) For my small project though, I've tried to write tests for each API endpoint using superset, Jest and mongodb-memory-server official documentations along with some examples.