pixelnode/node_modules/mocha/lib/reporters/min.js

37 lines
625 B
JavaScript
Raw Normal View History

2018-04-04 12:31:55 +02:00
/**
* Module dependencies.
*/
var Base = require('./base');
var inherits = require('../utils').inherits;
/**
* Expose `Min`.
*/
exports = module.exports = Min;
/**
* Initialize a new `Min` minimal test reporter (best used with --watch).
*
* @api public
* @param {Runner} runner
*/
function Min(runner) {
Base.call(this, runner);
runner.on('start', function() {
// clear screen
process.stdout.write('\u001b[2J');
// set cursor position
process.stdout.write('\u001b[1;3H');
});
runner.on('end', this.epilogue.bind(this));
}
/**
* Inherit from `Base.prototype`.
*/
inherits(Min, Base);