You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a specific place where they define the connection to MongoDB for each test. I want to perform the same thing but I am a bit stuck on how to achieve that.
Here is how I establish Mongo connection
The mongo service contains all the necessary code to load credentials and connect to mongodb.
is there a way to overwrite this when making the test setup?
I hope my question was clear enough, I can elaborate if needed, thank you.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I have a project running with Mongodb as a db backend, I would like to add a test suite, I saw this article https://medium.com/codechef-vit/integration-testing-for-express-mongoose-app-44390d29bb2 explaining how to perform such test with Jest and express.
There is a specific place where they define the connection to MongoDB for each test. I want to perform the same thing but I am a bit stuck on how to achieve that.
Here is how I establish Mongo connection
The mongo service contains all the necessary code to load credentials and connect to mongodb.
is there a way to overwrite this when making the test setup?
I hope my question was clear enough, I can elaborate if needed, thank you.
Beta Was this translation helpful? Give feedback.
All reactions