1 | ;
|
2 |
|
3 | /**
|
4 | * Module dependencies.
|
5 | */
|
6 |
|
7 | var Base = require('./base');
|
8 | var inherits = require('../utils').inherits;
|
9 |
|
10 | /**
|
11 | * Expose `Min`.
|
12 | */
|
13 |
|
14 | exports = 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 | */
|
22 | function 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 | */
|
38 | inherits(Min, Base);
|