[Pkg-javascript-commits] [node-tap-mocha-reporter] 26/137: cleaner 'end' event handling in runner

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:49:23 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 a385cfdee3ef5696228648734fcb3ff818489d7f
Author: isaacs <i at izs.me>
Date:   Sun Apr 26 10:12:05 2015 -0700

    cleaner 'end' event handling in runner
---
 lib/runner.js | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/runner.js b/lib/runner.js
index d65b638..771357f 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -92,6 +92,9 @@ function attachEvents (runner, parser, level) {
     parser.on('version', function (v) {
       runner.emit('version', v)
     })
+    parser.on('finish', function () {
+      runner.emit('end')
+    })
   }
 
   parser.emittedSuite = false
@@ -100,11 +103,6 @@ function attachEvents (runner, parser, level) {
   parser.name = ''
   parser.doingChild = null
 
-  parser.on('finish', function () {
-    if (!parser.parent)
-      runner.emit('end')
-  })
-
   parser.on('child', function (child) {
     //console.log('>>> child')
     child.parent = parser

-- 
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