Socket
Socket
Sign inDemoInstall

jest-junit

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-junit - npm Package Compare versions

Comparing version 3.4.1 to 3.5.0

9

package.json
{
"name": "jest-junit",
"version": "3.4.1",
"version": "3.5.0",
"description": "A jest result processor that generates junit xml files",

@@ -10,3 +10,3 @@ "main": "index.js",

"engines": {
"node": ">=4.0.0"
"node": ">=6.0.0"
},

@@ -19,3 +19,5 @@ "files": [

"scripts": {
"test": "jest"
"test": "jest",
"pretest:ci": "npm install jest@$JEST_VERSION",
"test:ci": "jest && jest --config ./integration-tests/jest.config.js"
},

@@ -28,5 +30,4 @@ "dependencies": {

"devDependencies": {
"jest": "20.0.4",
"libxmljs": "^0.18.4"
}
}

@@ -22,3 +22,6 @@ 'use strict';

'_attr': {
'name': options.suiteName
'name': options.suiteName,
'tests': 0,
'failures': 0,
'time': 0
}

@@ -57,2 +60,5 @@ }

// Add <testsuite /> properties
const suiteNumTests = suite.numFailingTests + suite.numPassingTests + suite.numPendingTests;
const suiteExecutionTime = (suite.perfStats.end - suite.perfStats.start) / 1000;
let testSuite = {

@@ -66,4 +72,4 @@ 'testsuite': [{

timestamp: (new Date(suite.perfStats.start)).toISOString().slice(0, -5),
time: (suite.perfStats.end - suite.perfStats.start) / 1000,
tests: suite.numFailingTests + suite.numPassingTests + suite.numPendingTests
time: suiteExecutionTime,
tests: suiteNumTests
}

@@ -73,2 +79,7 @@ }]

// Update top level testsuites properties
jsonResults.testsuites[0]._attr.failures += suite.numFailingTests;
jsonResults.testsuites[0]._attr.tests += suiteNumTests;
jsonResults.testsuites[0]._attr.time += suiteExecutionTime;
// Iterate through test cases

@@ -75,0 +86,0 @@ suite.testResults.forEach((tc) => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc