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

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

/**
 * Expose `Dot`.
 */

exports module.exports Dot;

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

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

  var 
self this
    
stats this.stats
    
width Base.window.width .75 0
    
= -1;

  
runner.on('start', function(){
    
process.stdout.write('n  ');
  });

  
runner.on('pending', function(test){
    if (++
width == 0process.stdout.write('n  ');
    
process.stdout.write(color('pending'Base.symbols.dot));
  });

  
runner.on('pass', function(test){
    if (++
width == 0process.stdout.write('n  ');
    if (
'slow' == test.speed) {
      
process.stdout.write(color('bright yellow'Base.symbols.dot));
    } else {
      
process.stdout.write(color(test.speedBase.symbols.dot));
    }
  });

  
runner.on('fail', function(testerr){
    if (++
width == 0process.stdout.write('n  ');
    
process.stdout.write(color('fail'Base.symbols.dot));
  });

  
runner.on('end', function(){
    
console.log();
    
self.epilogue();
  });
}

/**
 * Inherit from `Base.prototype`.
 */

Dot.prototype.__proto__ Base.prototype;
?>
Онлайн: 1
Реклама