[Pkg-javascript-commits] [node-tap-mocha-reporter] 78/137: Mark all parent suites as not-ok on fail assert

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:49:28 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 14eb172404e67ab9eace5cf926382b94ed8c098a
Author: isaacs <i at izs.me>
Date:   Thu Sep 3 15:13:01 2015 -0700

    Mark all parent suites as not-ok on fail assert
---
 lib/runner.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/runner.js b/lib/runner.js
index cbd0d52..fb7b340 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -272,9 +272,12 @@ function emitTest (parser, result) {
   var test = new Test(result, parser)
 
   if (parser.suite) {
-    //if (test.parent === parser)
-    //  test.parent = parser.suite
     parser.suite.tests.push(test)
+    if (!result.ok) {
+      for (var p = parser; p && p.suite; p = p.parent) {
+        p.suite.ok = false
+      }
+    }
     parser.suite.ok = parser.suite.ok && result.ok
   }
 

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