lib/reporters/mocha_worker_reporter.js
function MochaWorkerReporter (runner) {
  EVENTS.forEach(function (eventName) {
    runner.on(eventName, function (test, error) {
      var data = {
        'event' : eventName,
        'test'  : clean(test, error)
      };

      try {
        process.send({
          type : 'testResults',
          data : data
        });
      } catch (e) {
        console.log('MochaWorkerReporter: Error sending test results.', JSON.stringify(data), e.message, e.stack);
        process.exit(1);
      }
    });
  });
}
function MochaWorkerReporter (runner) {
  EVENTS.forEach(function (eventName) {
    runner.on(eventName, function (test, error) {
      var data = {
        'event' : eventName,
        'test'  : clean(test, error)
      };

      try {
        process.send({
          type : 'testResults',
          data : data
        });
      } catch (e) {
        console.log('MochaWorkerReporter: Error sending test results.', JSON.stringify(data), e.message, e.stack);
        process.exit(1);
      }
    });
  });
}
function MochaWorkerReporter ( runner ) { EVENTS . forEach ( function ( eventName ) { runner . on ( eventName , function ( test , error ) { var data = { 'event' : eventName , 'test' : clean ( test , error ) } ; try { process . send ( { type : 'testResults' , data : data } ) ; } catch ( e ) { console . log ( 'MochaWorkerReporter: Error sending test results.' , JSON . stringify ( data ) , e . message , e . stack ) ; process . exit ( 1 ) ; } } ) ; } ) ; }
Sends test results back to the master test running process.
Sends test results back to the master test running process .