intro-mongo-db
intro-mongo-db copied to clipboard
persist database connection between tests
When running tests on exercises/models an error stops the tests due to MongoError: pool is draining, new operations prohibited
. Refactored testconfig.js to execute mongoose.disconnect()
after all the tests have been completed instead of after each test.
@Hendrixer 🙏
@Hendrixer hope you have a minute to take a look at this soon. Solved my testing woes 😄
yup @Hendrixer this solved for me too. However @robhhr did this stop the jest --watch functionality from working ?
@robhhr I was searching for this for so long. Thank you !
Jest tests failing with error MongoError: pool is draining, new operations prohibited
@Hendrixer ping! :)