Skip to content

mocha 4 require explicit exit#1245

Closed
dcharbonnier wants to merge 1 commit intowebsockets:masterfrom
dcharbonnier:feature/mocha-4
Closed

mocha 4 require explicit exit#1245
dcharbonnier wants to merge 1 commit intowebsockets:masterfrom
dcharbonnier:feature/mocha-4

Conversation

@dcharbonnier
Copy link
Contributor

https://mochajs.org/#--exit----no-exit

Prior to version v4.0.0, by default, Mocha would force its own process to exit once it was finished executing all tests. This behavior enables a set of potential problems; it’s indicative of tests (or fixtures, harnesses, code under test, etc.) which don’t clean up after themselves properly. Ultimately, “dirty” tests can (but not always) lead to false positive or false negative results.

@lpinca
Copy link
Member

lpinca commented Nov 30, 2017

Thanks but I prefer to not force exit. If the process doesn't exit there is something wrong.

@lpinca
Copy link
Member

lpinca commented Nov 30, 2017

I didn't merge primus/primus#611 on Primus for the same reason. There is actually not much we can do there due to how polling works.

@3rd-Eden
Copy link
Member

I agree, found issues in some of my other projects where I upgraded to latest mocha were timers were never cleaned up correctly. If there is nothing more alive in the process, it should just exit automatically. If it doesn't do that we're leaking somewhere.

@dcharbonnier
Copy link
Contributor Author

right there is a bug related to the dns that create this problem

@dcharbonnier
Copy link
Contributor Author

the problem was #1246

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.

3 participants