-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix to exit correctly when using bail flag #3346
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests prove your fix is valid. Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When can we expect the fix to be published? |
On our side it hidden failed builds for weeks, so bug seems critical (for now we reverted to |
yes please release this |
sorry for the unnecessary ping, but also anxious for this fix |
(cherry picked from commit a5d1f1c)
published as v5.2.0 |
This Pull Request updates dependency [mocha](https://github.com/mochajs/mocha) from `~5.1.0` to `~5.2.0` <details> <summary>Release Notes</summary> ### [`v5.2.0`](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#​520--2018-05-18) [Compare Source](mochajs/mocha@v5.1.1...v5.2.0) #### 🎉 Enhancements - [#​3375]: Add support for comments in `mocha.opts` ([@​plroebuck]) #### 🐛 Fixes - [#​3346]: Exit correctly from `before` hooks when using `--bail` ([@​outsideris]) #### 📖 Documentation - [#​3328]: Mocha-flavored [API docs](https://mochajs.org/api/)! ([@​Munter]) #### 🔩 Other - [#​3330]: Use `Buffer.from()` ([@​harrysarson]) - [#​3295]: Remove redundant folder ([@​DavNej]) - [#​3356](`https://github.com/mochajs/mocha/pull/3356`): Refactoring ([@​plroebuck]) [#​3375]: `https://github.com/mochajs/mocha/pull/3375` [#​3346]: `https://github.com/mochajs/mocha/pull/3346` [#​3328]: `https://github.com/mochajs/mocha/pull/3328` [#​3330]: `https://github.com/mochajs/mocha/pull/3330` [#​3295]: `https://github.com/mochajs/mocha/pull/3295` [@​plroebuck]: https://github.com/plroebuck [@​harrysarson]: https://github.com/harrysarson [@​outsideris]: https://github.com/outsideris [@​Munter]: https://github.com/Munter --- </details> --- This PR has been generated by [Renovate Bot](https://renovatebot.com).
Description of the Change
The bail flag fixed in #3278, but it doesn't exit correctly when
before
hook throw an error.This PR fix to exit correctly whenever test or hook failed.
Alternate Designs
I don't have any idea.
Why should this be in core?
Now, when
before
hook failed, mocha doesn't exit correctly. It makes bail flag useless.Benefits
Users believe the result of mocha with bail flag.
Possible Drawbacks
I'm not sure.
Applicable issues
Fix #3303