jest-junit
Advanced tools
Comparing version 3.7.0 to 4.0.0
{ | ||
"name": "jest-junit", | ||
"version": "3.7.0", | ||
"version": "4.0.0", | ||
"description": "A jest result processor that generates junit xml files", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,2 +16,6 @@ 'use strict'; | ||
const executionTime = function (startTime, endTime) { | ||
return (endTime - startTime) / 1000; | ||
} | ||
module.exports = function (report, appDirectory, options) { | ||
@@ -26,3 +30,6 @@ // Generate a single XML file for all jest tests | ||
'failures': 0, | ||
'time': 0 | ||
// Overall execution time: | ||
// Since tests are typically executed in parallel this time can be significantly smaller | ||
// than the sum of the individual test suites | ||
'time': executionTime(report.startTime, Date.now()) | ||
} | ||
@@ -64,3 +71,3 @@ } | ||
const suiteNumTests = suite.numFailingTests + suite.numPassingTests + suite.numPendingTests; | ||
const suiteExecutionTime = (suite.perfStats.end - suite.perfStats.start) / 1000; | ||
const suiteExecutionTime = executionTime(suite.perfStats.start, suite.perfStats.end); | ||
@@ -84,3 +91,2 @@ let testSuite = { | ||
jsonResults.testsuites[0]._attr.tests += suiteNumTests; | ||
jsonResults.testsuites[0]._attr.time += suiteExecutionTime; | ||
@@ -87,0 +93,0 @@ // Iterate through test cases |
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
24274
208