UNPKG

642 BJavaScriptView Raw
1'use strict';
2
3/**
4 * Module dependencies.
5 */
6
7var Base = require('./base');
8var inherits = require('../utils').inherits;
9
10/**
11 * Expose `Min`.
12 */
13
14exports = module.exports = Min;
15
16/**
17 * Initialize a new `Min` minimal test reporter (best used with --watch).
18 *
19 * @api public
20 * @param {Runner} runner
21 */
22function Min (runner) {
23 Base.call(this, runner);
24
25 runner.on('start', function () {
26 // clear screen
27 process.stdout.write('\u001b[2J');
28 // set cursor position
29 process.stdout.write('\u001b[1;3H');
30 });
31
32 runner.on('end', this.epilogue.bind(this));
33}
34
35/**
36 * Inherit from `Base.prototype`.
37 */
38inherits(Min, Base);