Socket
Socket
Sign inDemoInstall

jest-teamcity

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-teamcity - npm Package Compare versions

Comparing version 1.7.0 to 1.8.0

3

__tests__/data.json

@@ -14,5 +14,6 @@ [

{ "ancestorTitles": ["path2", "to", "test4"], "title": "title4", "status": "failed", "duration": 123 },
{ "ancestorTitles": ["path2", "to", "test5"], "title": "title5", "status": "failed", "failureMessages": ["Unexpected exception\n at path/to/file1.js:1\n at path/to/file2.js:2"], "duration": 123 }
{ "ancestorTitles": ["path2", "to", "test5"], "title": "title5", "status": "failed", "failureMessages": ["Unexpected exception\n at path/to/file1.js:1\n at path/to/file2.js:2"], "duration": 123 },
{ "ancestorTitles": ["path2", "to", "constructor"], "title": "title6", "status": "passed", "duration": 123 }
]
}
]

@@ -40,2 +40,6 @@ "use strict";

["##teamcity[testSuiteFinished name='test5' flowId='12345']"],
["##teamcity[testSuiteStarted name='constructor' flowId='12345']"],
["##teamcity[testStarted name='title6' flowId='12345']"],
["##teamcity[testFinished name='title6' duration='123' flowId='12345']"],
["##teamcity[testSuiteFinished name='constructor' flowId='12345']"],
["##teamcity[testSuiteFinished name='to' flowId='12345']"],

@@ -42,0 +46,0 @@ ["##teamcity[testSuiteFinished name='path2' flowId='12345']"],

@@ -35,2 +35,6 @@ const consoleOutput = [

["##teamcity[testSuiteFinished name='test5' flowId='12345']"],
["##teamcity[testSuiteStarted name='constructor' flowId='12345']"],
["##teamcity[testStarted name='title6' flowId='12345']"],
["##teamcity[testFinished name='title6' duration='123' flowId='12345']"],
["##teamcity[testSuiteFinished name='constructor' flowId='12345']"],
["##teamcity[testSuiteFinished name='to' flowId='12345']"],

@@ -37,0 +41,0 @@ ["##teamcity[testSuiteFinished name='path2' flowId='12345']"],

"use strict";
const _ = require("lodash");
const path = require("path");

@@ -108,11 +107,20 @@

testFile.testResults.forEach(test => {
const path = [filename].concat(test.ancestorTitles).concat("_tests_");
if (!_.has(suites, path)) {
_.set(suites, path, []);
const path = [filename].concat(test.ancestorTitles);
// find current suite, creating each level if necessary
let currentSuite = suites;
for (const p of path) {
if (!Object.prototype.hasOwnProperty.call(currentSuite, p)) {
currentSuite[p] = {};
}
currentSuite = currentSuite[p];
}
const testsList = _.get(suites, path);
testsList.push(test);
// last level is array of test results
if (!currentSuite["_tests_"]) {
currentSuite["_tests_"] = [];
}
_.set(suites, path, testsList);
// add the current test
currentSuite["_tests_"].push(test);
});

@@ -119,0 +127,0 @@ });

{
"name": "jest-teamcity",
"version": "1.7.0",
"version": "1.8.0",
"description": "Teamcity Reporter for Jest Testing framework",
"homepage": "https://github.com/itereshchenkov/jest-teamcity",
"main": "lib/index.js",
"dependencies": {
"lodash": "^4.17.15"
},
"dependencies": {},
"devDependencies": {
"jest": "^25.1.0",
"prettier": "^1.19.1"
"jest": "^26.1.0",
"prettier": "^2.0.5"
},

@@ -14,0 +12,0 @@ "scripts": {

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