I want to test my ExpressJS controller code. How do I test the database calls?
I am using MongoDB as database and mongoose as the ODM. I want to test my controller code but don't want to use the database for testing, how can I mock the database and database calls? How do you generally test your controller code.