Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

persist database connection between tests #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robhhr
Copy link

@robhhr robhhr commented Feb 15, 2020

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.

@robhhr robhhr requested a review from Hendrixer February 21, 2020 03:55
@roma219
Copy link

roma219 commented Mar 6, 2020

@Hendrixer 🙏

@learnsometing
Copy link

learnsometing commented Jul 25, 2020

@Hendrixer hope you have a minute to take a look at this soon. Solved my testing woes 😄

@craigmark0
Copy link

yup @Hendrixer this solved for me too. However @robhhr did this stop the jest --watch functionality from working ?

@McQuinTrix
Copy link

McQuinTrix commented Oct 22, 2020

@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! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants