Вход Регистрация
Файл: error-kitty/node_modules/mocha/lib/reporters/json-stream.js
Строк: 59
<?php
/**
 * Module dependencies.
 */

var Base = require('./base')
  , 
color Base.color;

/**
 * Expose `List`.
 */

exports module.exports = List;

/**
 * Initialize a new `List` test reporter.
 *
 * @param {Runner} runner
 * @api public
 */

function List(runner) {
  
Base.call(thisrunner);

  var 
self this
    
stats this.stats
    
total runner.total;

  
runner.on('start', function(){
    
console.log(JSON.stringify(['start', { totaltotal }]));
  });

  
runner.on('pass', function(test){
    
console.log(JSON.stringify(['pass'clean(test)]));
  });

  
runner.on('fail', function(testerr){
    
console.log(JSON.stringify(['fail'clean(test)]));
  });

  
runner.on('end', function(){
    
process.stdout.write(JSON.stringify(['end'self.stats]));
  });
}

/**
 * Return a plain-object representation of `test`
 * free of cyclic properties etc.
 *
 * @param {Object} test
 * @return {Object}
 * @api private
 */

function clean(test) {
  return {
      
titletest.title
    
fullTitletest.fullTitle()
    , 
durationtest.duration
  
}
}
?>
Онлайн: 1
Реклама