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

NYC hanging when updating mocha to 4.0.1 #688

Closed
michaeldfallen opened this issue Oct 12, 2017 · 3 comments
Closed

NYC hanging when updating mocha to 4.0.1 #688

michaeldfallen opened this issue Oct 12, 2017 · 3 comments

Comments

@michaeldfallen
Copy link

Expected Behavior

Running yarn test executes tests and reports coverage at the end.

Observed Behavior

Mocha completes it's test suites and then all output hangs. After 10mins travis fails the build.

Bonus Points! Code (or Repository) that Reproduces Issue

hmcts/one-per-page#48

Forensic Information

Environment is repeatable by cloning https://github.com/hmcts/one-per-page and running make. That will drop you in a shell ready to replicate by running yarn test.

Operating System: Ubuntu based docker image - Linux c1cc44f7cb4a 4.10.0-35-generic #39-Ubuntu SMP Wed Sep 13 07:46:59 UTC 2017 x86_64 GNU/Linux
Environment Information: https://gist.github.com/michaeldfallen/35457b47f8da03d54e7b30a4a30e9645

@TheAdamizer
Copy link

Hi @michaeldfallen This is due to a change to Mocha's exit behavior in version 4. As discussed here a workaround is to simply add --exit to the mocha execution in your package.json or what have you like so:

"scripts": {
  "tests": "nyc mocha --exit"
},

@vinteo
Copy link
Member

vinteo commented Nov 15, 2017

Closing as the issue is with mocha and workaround has been provided.

@vinteo vinteo closed this as completed Nov 15, 2017
@basickarl
Copy link

This information SHOULD be added to the documentation.

ghost pushed a commit to practo/fivebeans that referenced this issue Apr 15, 2019
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

No branches or pull requests

4 participants