Mocha root hook plugin to convert unhandled rejection events to unhandled exceptions so that they will cause test failures.
npm install mocha-ur2uemocha-ur2ue
===========





A Mocha root hook
plugin to convertunhandledrejection
events
to unhandled exceptions so that they will cause test failures. This works
around a long-standing issue
(mochajs/mocha#1926 and
mochajs/mocha#2640) that
unhandled rejections do not cause test failure in Mocha.
``sh`
npm install --save-dev mocha mocha-ur2ue
mocha --require mocha-ur2ue --recursive tests
This package can be
installed using npm, either globally or locally, by
running:
`sh``
npm install mocha-ur2ue
Contributions are appreciated. Contributors agree to abide by the Contributor
Covenant Code of
Conduct.
If this is your first time contributing to a Free and Open Source Software
project, consider reading How to Contribute to Open
Source
in the Open Source Guides.
If the desired change is large, complex, backwards-incompatible, can have
significantly differing implementations, or may not be in scope for this
project, opening an issue before writing the code can avoid frustration and
save a lot of time and effort.
This project is available under the terms of the MIT License.
See the summary at TLDRLegal.