lib/reporter.js
function ForwardMochaReporter(mochaRunner, options) {
    Base.call(this, mochaRunner, options);
    forwardEvent(mochaRunner, runner, 'start');
    forwardEvent(mochaRunner, runner, 'suite');
    forwardEvent(mochaRunner, runner, 'suite end');
    forwardEvent(mochaRunner, runner, 'pending');
    forwardEvent(mochaRunner, runner, 'pass');
    forwardEvent(mochaRunner, runner, 'fail');
    // when runner output should be captured, it is done for the end event only.
    mochaRunner.on('end', function () {
        try {
            if (outputFile) {
                console.log(outputFile);
                captureStdout(outputFile);
            }
            var args = Array.prototype.slice.call(arguments, 0);
            runner.emit.apply(runner, ['end'].concat(args));
            releaseStdout();
        } catch (e) {
            releaseStdout();
        }
    });
  }
function ForwardMochaReporter(mochaRunner, options) {
    Base.call(this, mochaRunner, options);
    forwardEvent(mochaRunner, runner, 'start');
    forwardEvent(mochaRunner, runner, 'suite');
    forwardEvent(mochaRunner, runner, 'suite end');
    forwardEvent(mochaRunner, runner, 'pending');
    forwardEvent(mochaRunner, runner, 'pass');
    forwardEvent(mochaRunner, runner, 'fail');
    // when runner output should be captured, it is done for the end event only.
    mochaRunner.on('end', function () {
        try {
            if (outputFile) {
                console.log(outputFile);
                captureStdout(outputFile);
            }
            var args = Array.prototype.slice.call(arguments, 0);
            runner.emit.apply(runner, ['end'].concat(args));
            releaseStdout();
        } catch (e) {
            releaseStdout();
        }
    });
  }
function ForwardMochaReporter ( mochaRunner , options ) { Base . call ( this , mochaRunner , options ) ; forwardEvent ( mochaRunner , runner , 'start' ) ; forwardEvent ( mochaRunner , runner , 'suite' ) ; forwardEvent ( mochaRunner , runner , 'suite end' ) ; forwardEvent ( mochaRunner , runner , 'pending' ) ; forwardEvent ( mochaRunner , runner , 'pass' ) ; forwardEvent ( mochaRunner , runner , 'fail' ) ; // when runner output should be captured, it is done for the end event only. mochaRunner . on ( 'end' , function ( ) { try { if ( outputFile ) { console . log ( outputFile ) ; captureStdout ( outputFile ) ; } var args = Array . prototype . slice . call ( arguments , 0 ) ; runner . emit . apply ( runner , [ 'end' ] . concat ( args ) ) ; releaseStdout ( ) ; } catch ( e ) { releaseStdout ( ) ; } } ) ; }
Initialize a new `ProxyReporter` reporter.

@param {Runner} runner
@api public
Initialize a new ProxyReporter reporter .