summaryrefslogtreecommitdiff
path: root/node_modules/mocha/lib/reporters/min.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/mocha/lib/reporters/min.js')
-rw-r--r--node_modules/mocha/lib/reporters/min.js37
1 files changed, 37 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..9f3cea1
--- /dev/null
+++ b/node_modules/mocha/lib/reporters/min.js
@@ -0,0 +1,37 @@
+/**
+ * Module dependencies.
+ */
+
+var Base = require('./base');
+
+/**
+ * Expose `Min`.
+ */
+
+exports = module.exports = Min;
+
+/**
+ * Initialize a new `Min` minimal test reporter (best used with --watch).
+ *
+ * @param {Runner} runner
+ * @api public
+ */
+
+function Min(runner) {
+ Base.call(this, runner);
+
+ runner.on('start', function(){
+ // clear screen
+ process.stdout.write('\033[2J');
+ // set cursor position
+ process.stdout.write('\033[1;3H');
+ });
+
+ runner.on('end', this.epilogue.bind(this));
+}
+
+/**
+ * Inherit from `Base.prototype`.
+ */
+
+Min.prototype.__proto__ = Base.prototype; \ No newline at end of file