tap-mocha-reporter
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -183,14 +183,34 @@ // A facade from the tap-parser to the Mocha "Runner" object. | ||
// we've already emitted a 'suite end' event for this. | ||
// UNLESS, there were no other asserts, AND it's root level | ||
if (this.doingChild) { | ||
var suite = this.doingChild.suite | ||
if (this.doingChild.didAssert && | ||
this.doingChild.name === result.name) { | ||
if (this.doingChild.name === result.name) { | ||
if (suite && result.time) | ||
suite.duration = result.time | ||
} | ||
var emitOn = this | ||
var dc = this.doingChild | ||
this.doingChild = null | ||
if (suite) { | ||
runner.emit('suite end', suite) | ||
if (!dc.didAssert && dc.level === 1) { | ||
emitOn = dc | ||
} else if (dc.didAssert) { | ||
if (dc.suite) | ||
runner.emit('suite end', dc.suite) | ||
return | ||
} else { | ||
emitOn = this | ||
} | ||
emitSuite(emitOn) | ||
emitTest(emitOn, result) | ||
if (emitOn !== this && emitOn.suite) { | ||
runner.emit('suite end', emitOn.suite) | ||
delete emitOn.suite | ||
} | ||
if (dc.suite) { | ||
runner.emit('suite end', dc.suite) | ||
} | ||
return | ||
} | ||
@@ -197,0 +217,0 @@ |
{ | ||
"name": "tap-mocha-reporter", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "Format a TAP stream using Mocha's set of reporters", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
118787
3615