mocha-events-wrapper
v0.5.3
Published
Wrapper for mocha.run that fires simpler, more consumable events
Downloads
6
Maintainers
Readme
mocha-events-wrapper
Extension of the mocha programmatic api
that fires more consumable events. Wraps mocha.run
with a simpler interface.
Usage
var Mocha = require('mocha-events-wrapper');
var mew = new Mocha({ require: './mocktest' });
mew.on('suite', function (event) {
console.log(event.suite.title);
});
mew.on('fail', function (event) {
console.error(event.test.title);
});
API
Events
- suite
- suite
- level
- suite end
- suite
- level
- pass
- test
- level
- fail
- error
- test
- level
Information
- npm: https://www.npmjs.org/package/mocha-events-wrapper
- github: https://github.com/tjwebb/mocha-events-wrapper
- License: MIT