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

Warning: Express' tests break under forthcoming Mocha v4.0.0 #3439

Closed
boneskull opened this issue Oct 1, 2017 · 4 comments
Closed

Warning: Express' tests break under forthcoming Mocha v4.0.0 #3439

boneskull opened this issue Oct 1, 2017 · 4 comments
Assignees

Comments

@boneskull
Copy link

boneskull commented Oct 1, 2017

I ran express' master tests against Mocha's current master branch (via dont-break), and the tests did not complete (the Node.js process hangs).

This is likely because of a forthcoming change in v4 which will cause Mocha to not force exit its own process once it's finished running tests (by default). See this issue for more background.

If I had to hazard a guess, likely one or more of Express' tests are leaving socket(s) open instead of closing them explicitly.

If Express wishes to upgrade, its options are:

  1. Audit the tests and ensure they are not leaving any sockets, servers, etc., open/listening when they complete, or
  2. Revert to pre-v4 behavior by supplying the --exit option to Mocha
@dougwilson
Copy link
Contributor

Thanks for the notification! From my understanding mocha 4 won't work under Node.js 0.10 anyway, so we won't be upgrading master to that version anyway, but Express 5 would end up upgrading, though, so would need to be addressed at that time.

@dougwilson
Copy link
Contributor

Ok, tests are fixed and running under --no-exit on master now 👍

@dougwilson dougwilson self-assigned this Oct 1, 2017
@boneskull
Copy link
Author

(to be clear, --exit is the default behavior for v3, and the default for v4 will be --no-exit)

@dougwilson
Copy link
Contributor

Right. I effectively resolved using option 1 and went ahead and used the flag to make mocha v3 behave like v4 will to be ready.

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

No branches or pull requests

2 participants