-
Notifications
You must be signed in to change notification settings - Fork 42
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
mocha 4+ doesn't exit when using mockgoose in tests #71
Comments
I've submitted a PR to mongodb-prebuilt to add the helper functions to enable this: mongodb-js/mongodb-prebuilt#49 |
+1, any word on this? |
Until #72 is merged, I use this code in my
|
adding the above code works when there is one test file in mocha 5, but when there are 2+ test files (ie. multiple after's) it still seems to hang. Is there a better workaround for that? |
@j3ko Something like this works for me:
Then in your tests you can do:
|
Mocha 4+ changed behaviour to "no longer force the process to exit once all tests complete".
Mockgoose runs into this behaviour change due to the child process for mongod stopping mocha from exiting.
The text was updated successfully, but these errors were encountered: