[Pkg-javascript-commits] [node-tap-mocha-reporter] 37/137: Trim fullTitle() values

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:49:24 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 6045e31b25eb7b2631d8d2d130d82794083fc68c
Author: isaacs <i at izs.me>
Date:   Mon Apr 27 11:48:40 2015 -0400

    Trim fullTitle() values
---
 lib/runner.js | 4 ++--
 lib/suite.js  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/runner.js b/lib/runner.js
index f6f3a9c..2f46713 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -78,7 +78,7 @@ Parser.prototype.fullTitle = function () {
   if (!this.parent)
     return this.name || ''
   else
-    return this.parent.fullTitle() + ' ' + (this.name || '').trim()
+    return (this.parent.fullTitle() + ' ' + (this.name || '')).trim()
 }
 
 function attachEvents (runner, parser, level) {
@@ -139,7 +139,7 @@ function attachEvents (runner, parser, level) {
   parser.on('comment', function (c) {
     if (c.match(/^# Subtest: /)) {
       c = c.trim().replace(/^# Subtest: /, '')
-      parser.name = c
+      parser.name = c.trim()
     }
 
     // get the top-level duration from the trailing comment,
diff --git a/lib/suite.js b/lib/suite.js
index 2bd1b6a..270c085 100644
--- a/lib/suite.js
+++ b/lib/suite.js
@@ -15,7 +15,7 @@ function Suite (parent) {
 
 Suite.prototype.fullTitle = function () {
   if (!this.parent)
-    return this.title || ''
+    return (this.title || '').trim()
   else
-    return this.parent.fullTitle() + ' ' + (this.title || '').trim()
+    return (this.parent.fullTitle() + ' ' + (this.title || '')).trim()
 }

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