Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 878 Bytes

README.md

File metadata and controls

43 lines (35 loc) · 878 Bytes

mocha-events-wrapper

Build Status

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