mochawesome
Advanced tools
Comparing version 7.1.2 to 7.1.3
{ | ||
"name": "mochawesome", | ||
"version": "7.1.2", | ||
"version": "7.1.3", | ||
"description": "A gorgeous reporter for Mocha.js", | ||
@@ -58,3 +58,3 @@ "scripts": { | ||
"lodash.isstring": "^4.0.1", | ||
"mochawesome-report-generator": "^6.1.1", | ||
"mochawesome-report-generator": "^6.2.0", | ||
"strip-ansi": "^6.0.1", | ||
@@ -61,0 +61,0 @@ "uuid": "^8.3.2" |
@@ -164,10 +164,12 @@ const Base = require('mocha/lib/reporters/base'); | ||
// support `reportFilename` [name] replacement token | ||
if (rootSuite.suites.length === 1) { | ||
const firstSuite = rootSuite.suites[0]; | ||
rootSuite.file = firstSuite.file || rootSuite.file; | ||
rootSuite.fullFile = firstSuite.fullFile || rootSuite.fullFile; | ||
} else if (!rootSuite.suites.length && rootSuite.tests.length) { | ||
const firstTest = this.runner.suite.tests[0]; | ||
rootSuite.file = firstTest.file || rootSuite.file; | ||
rootSuite.fullFile = firstTest.fullFile || rootSuite.fullFile; | ||
if (rootSuite) { | ||
if (rootSuite.suites.length === 1) { | ||
const firstSuite = rootSuite.suites[0]; | ||
rootSuite.file = firstSuite.file || rootSuite.file; | ||
rootSuite.fullFile = firstSuite.fullFile || rootSuite.fullFile; | ||
} else if (!rootSuite.suites.length && rootSuite.tests.length) { | ||
const firstTest = this.runner.suite.tests[0]; | ||
rootSuite.file = firstTest.file || rootSuite.file; | ||
rootSuite.fullFile = firstTest.fullFile || rootSuite.fullFile; | ||
} | ||
} | ||
@@ -174,0 +176,0 @@ |
@@ -13,3 +13,3 @@ const isString = require('lodash.isstring'); | ||
/** | ||
* Return a classname based on percentage | ||
* Logger utility | ||
* | ||
@@ -16,0 +16,0 @@ * @param {String} msg - message to log |
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
35662
742