Description
openedon Mar 27, 2017
The 'start' event is emitted synchronously downstream of the mocha.run
method. Thus, if you are attaching a listener to that event after calling mocha.run
(to get the runner instance), you miss the event:
var runner = mocha.run(function (failures) {
process.on('exit', function () {
process.exit(failures); // exit with non-zero status if there were failures
});
});
runner.on('start', function (Evt) {
//never called
});
Maybe there is some other way to attach event listeners to the runner prior to calling run, but I haven't found it yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment