[Pkg-javascript-commits] [node-tap-mocha-reporter] 20/137: Stub 'classic' reporter, and declare dependencies
Bastien Roucariès
rouca at moszumanska.debian.org
Thu Sep 7 09:49:22 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-tap-mocha-reporter.
commit 49169ab4dfdf148409954a24875f9654936c99a5
Author: isaacs <i at izs.me>
Date: Sat Apr 25 14:24:58 2015 -0700
Stub 'classic' reporter, and declare dependencies
---
README.md | 1 -
index.js | 0
lib/reporters/classic.js | 39 +++++++++++++++++++++++++++++++++++++++
lib/reporters/index.js | 1 +
package.json | 4 ++++
5 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 804fc6b..68ba6ce 100644
--- a/README.md
+++ b/README.md
@@ -24,5 +24,4 @@ var TSR = require('tap-mocha-reporter')
fs.createReadStream('saved-test-output.tap')
.pipe(TSR('dot'))
- .pipe(process.stdout)
```
diff --git a/index.js b/index.js
old mode 100644
new mode 100755
diff --git a/lib/reporters/classic.js b/lib/reporters/classic.js
new file mode 100644
index 0000000..1ea19cf
--- /dev/null
+++ b/lib/reporters/classic.js
@@ -0,0 +1,39 @@
+exports = module.exports = Dump
+var Base = require('./base')
+ , cursor = Base.cursor
+ , color = Base.color;
+
+function Dump(runner) {
+ Base.call(this, runner);
+
+ var events = [
+ 'start',
+ 'version',
+ 'end',
+ 'suite',
+ 'suite end',
+ 'test',
+ 'pending',
+ 'pass',
+ 'fail',
+ 'test end',
+ ];
+
+ var i = process.argv.indexOf('dump')
+ if (i !== -1) {
+ var args = process.argv.slice(i + 1)
+ if (args.length)
+ events = args
+ }
+
+ events.forEach(function (ev) {
+ runner.on(ev, function () {
+ console.log(ev)
+ if (arguments.length) {
+ var args = [].concat.apply([], arguments)
+ console.log.apply(console, args)
+ console.log()
+ }
+ })
+ })
+}
diff --git a/lib/reporters/index.js b/lib/reporters/index.js
index 0fe87bd..9035604 100644
--- a/lib/reporters/index.js
+++ b/lib/reporters/index.js
@@ -16,4 +16,5 @@ exports.jsoncov = require('./json-cov.js')
exports.htmlcov = require('./html-cov.js')
exports.jsonstream = require('./json-stream.js')
exports.dump = require('./dump.js')
+exports.classic = require('./classic.js')
exports.silent = require('./silent.js')
diff --git a/package.json b/package.json
index cf74822..0150fbd 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,11 @@
},
"homepage": "https://github.com/isaacs/tap-mocha-reporter",
"dependencies": {
+ "debug": "^2.1.3",
+ "diff": "^1.3.2",
+ "escape-string-regexp": "^1.0.3",
"exit-code": "^1.0.1",
+ "glob": "^5.0.5",
"supports-color": "^1.3.1",
"tap-parser": "^1.0.4"
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap-mocha-reporter.git
More information about the Pkg-javascript-commits
mailing list