37 lines
625 B
JavaScript
37 lines
625 B
JavaScript
/**
|
|
* 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);
|