diff options
Diffstat (limited to 'node_modules/mocha/lib/reporters/min.js')
| -rw-r--r-- | node_modules/mocha/lib/reporters/min.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/node_modules/mocha/lib/reporters/min.js b/node_modules/mocha/lib/reporters/min.js new file mode 100644 index 0000000..2b48212 --- /dev/null +++ b/node_modules/mocha/lib/reporters/min.js @@ -0,0 +1,36 @@ +/** + * 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); |
