lib/mocha.js
function Runner(suite) {
  var self = this;
  this._globals = [];
  this.suite = suite;
  this.total = suite.total();
  this.failures = 0;
  this.on('test end', function(test){ self.checkGlobals(test); });
  this.on('hook end', function(hook){ self.checkGlobals(hook); });
  this.grep(/.*/);
  this.globals(this.globalProps().concat(['errno']));
}
function Runner(suite) {
  var self = this;
  this._globals = [];
  this.suite = suite;
  this.total = suite.total();
  this.failures = 0;
  this.on('test end', function(test){ self.checkGlobals(test); });
  this.on('hook end', function(hook){ self.checkGlobals(hook); });
  this.grep(/.*/);
  this.globals(this.globalProps().concat(['errno']));
}
function Runner ( suite ) { var self = this ; this . _globals = [ ] ; this . suite = suite ; this . total = suite . total ( ) ; this . failures = 0 ; this . on ( 'test end' , function ( test ) { self . checkGlobals ( test ) ; } ) ; this . on ( 'hook end' , function ( hook ) { self . checkGlobals ( hook ) ; } ) ; this . grep ( / .* / ) ; this . globals ( this . globalProps ( ) . concat ( [ 'errno' ] ) ) ; }
Initialize a `Runner` for the given `suite`.

Events:

- `start`  execution started
- `end`  execution complete
- `suite`  (suite) test suite execution started
- `suite end`  (suite) all tests (and sub-suites) have finished
- `test`  (test) test execution started
- `test end`  (test) test completed
- `hook`  (hook) hook execution started
- `hook end`  (hook) hook complete
- `pass`  (test) test passed
- `fail`  (test, err) test failed

@api public
Initialize a Runner for the given suite .