lib/reporters/list.js
function List(runner, options) {
  Base.call(this, runner, options);

  var self = this;
  var n = 0;

  runner.on(EVENT_RUN_BEGIN, function() {
    console.log();
  });

  runner.on(EVENT_TEST_BEGIN, function(test) {
    process.stdout.write(color('pass', '    ' + test.fullTitle() + ': '));
  });

  runner.on(EVENT_TEST_PENDING, function(test) {
    var fmt = color('checkmark', '  -') + color('pending', ' %s');
    console.log(fmt, test.fullTitle());
  });

  runner.on(EVENT_TEST_PASS, function(test) {
    var fmt =
      color('checkmark', '  ' + Base.symbols.ok) +
      color('pass', ' %s: ') +
      color(test.speed, '%dms');
    cursor.CR();
    console.log(fmt, test.fullTitle(), test.duration);
  });

  runner.on(EVENT_TEST_FAIL, function(test) {
    cursor.CR();
    console.log(color('fail', '  %d) %s'), ++n, test.fullTitle());
  });

  runner.once(EVENT_RUN_END, self.epilogue.bind(self));
}
function List(runner, options) {
  Base.call(this, runner, options);

  var self = this;
  var n = 0;

  runner.on(EVENT_RUN_BEGIN, function() {
    console.log();
  });

  runner.on(EVENT_TEST_BEGIN, function(test) {
    process.stdout.write(color('pass', '    ' + test.fullTitle() + ': '));
  });

  runner.on(EVENT_TEST_PENDING, function(test) {
    var fmt = color('checkmark', '  -') + color('pending', ' %s');
    console.log(fmt, test.fullTitle());
  });

  runner.on(EVENT_TEST_PASS, function(test) {
    var fmt =
      color('checkmark', '  ' + Base.symbols.ok) +
      color('pass', ' %s: ') +
      color(test.speed, '%dms');
    cursor.CR();
    console.log(fmt, test.fullTitle(), test.duration);
  });

  runner.on(EVENT_TEST_FAIL, function(test) {
    cursor.CR();
    console.log(color('fail', '  %d) %s'), ++n, test.fullTitle());
  });

  runner.once(EVENT_RUN_END, self.epilogue.bind(self));
}
function List ( runner , options ) { Base . call ( this , runner , options ) ; var self = this ; var n = 0 ; runner . on ( EVENT_RUN_BEGIN , function ( ) { console . log ( ) ; } ) ; runner . on ( EVENT_TEST_BEGIN , function ( test ) { process . stdout . write ( color ( 'pass' , '    ' + test . fullTitle ( ) + ': ' ) ) ; } ) ; runner . on ( EVENT_TEST_PENDING , function ( test ) { var fmt = color ( 'checkmark' , '  -' ) + color ( 'pending' , ' %s' ) ; console . log ( fmt , test . fullTitle ( ) ) ; } ) ; runner . on ( EVENT_TEST_PASS , function ( test ) { var fmt = color ( 'checkmark' , '  ' + Base . symbols . ok ) + color ( 'pass' , ' %s: ' ) + color ( test . speed , '%dms' ) ; cursor . CR ( ) ; console . log ( fmt , test . fullTitle ( ) , test . duration ) ; } ) ; runner . on ( EVENT_TEST_FAIL , function ( test ) { cursor . CR ( ) ; console . log ( color ( 'fail' , '  %d) %s' ) , ++ n , test . fullTitle ( ) ) ; } ) ; runner . once ( EVENT_RUN_END , self . epilogue . bind ( self ) ) ; }
Constructs a new `List` reporter instance.

@public
@class
@memberof Mocha.reporters
@extends Mocha.reporters.Base
@param {Runner} runner - Instance triggers reporter actions.
@param {Object} [options] - runner options
Constructs a new List reporter instance .