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.8.0 to 1.9.0

2

__tests__/data.json

@@ -18,2 +18,2 @@ [

}
]
]

@@ -141,3 +141,22 @@ "use strict";

});
test("textExecError", () => {
formatter.formatReport([{
"testFilePath": "/Users/spec-with-error/failing.spec.ts",
"testResults": [],
"testExecError": {
"message": "Error:\nSomething bad is happened!",
"stack": "Error: Timeout of 181000 waiting for jest process 168 reached!\nThat means that your test suite, the spec file, took too much time to execute. Try spliting the spec to multiple specs.\n at Timeout._onTimeout (evalmachine.<anonymous>:1901:31)\n at listOnTimeout (internal/timers.js:549:17)\n at processTimers (internal/timers.js:492:7)",
"type": "Error"
}
}], "/Users/spec-with-error", "12345");
expect(console.log.mock.calls).toEqual([
["##teamcity[testSuiteStarted name='failing.spec.ts' flowId='12345']"],
["##teamcity[testStarted name='Jest failed to execute suite' flowId='12345']"],
["##teamcity[testFailed name='Jest failed to execute suite' message='Error:|nSomething bad is happened!' details='Error: Timeout of 181000 waiting for jest process 168 reached!|nThat means that your test suite, the spec file, took too much time to execute. Try spliting the spec to multiple specs.|n at Timeout._onTimeout (evalmachine.<anonymous>:1901:31)|n at listOnTimeout (internal/timers.js:549:17)|n at processTimers (internal/timers.js:492:7)' flowId='12345']"],
["##teamcity[testFinished name='Jest failed to execute suite' duration='0' flowId='12345']"],
["##teamcity[testSuiteFinished name='failing.spec.ts' flowId='12345']"],
]);
});
});
});
"use strict";
const path = require("path");
const errorMessageStackSeparator = "\n ";

@@ -45,8 +46,7 @@ module.exports = {

test.failureMessages.forEach(error => {
const separator = "\n ";
const [message, ...stack] = error.split(separator);
const [message, ...stack] = error.split(errorMessageStackSeparator);
this.log(
`##teamcity[testFailed name='${this.escape(test.title)}' message='${this.escape(
message
)}' details='${this.escape(stack.join(separator))}' flowId='${flowId}']`
)}' details='${this.escape(stack.join(errorMessageStackSeparator))}' flowId='${flowId}']`
);

@@ -127,2 +127,12 @@ });

});
if (testFile.testExecError && testFile.testResults.length === 0) {
suites[filename] = suites[filename] || {};
suites[filename]['_tests_'] = [{
status: 'failed',
title: 'Jest failed to execute suite',
duration: 0,
failureMessages: [`${testFile.testExecError.message}${errorMessageStackSeparator}${testFile.testExecError.stack}`],
}];
}
});

@@ -129,0 +139,0 @@

{
"name": "jest-teamcity",
"version": "1.8.0",
"version": "1.9.0",
"description": "Teamcity Reporter for Jest Testing framework",

@@ -9,4 +9,4 @@ "homepage": "https://github.com/itereshchenkov/jest-teamcity",

"devDependencies": {
"jest": "^26.1.0",
"prettier": "^2.0.5"
"jest": "^26.4.2",
"prettier": "^2.1.2"
},

@@ -13,0 +13,0 @@ "scripts": {

# jest-teamcity
[![Build Status](https://travis-ci.org/itereshchenkov/jest-teamcity.svg?branch=master)](https://travis-ci.org/itereshchenkov/jest-teamcity)
![Package Verifier](https://github.com/itereshchenkov/jest-teamcity/workflows/Package%20Verifier/badge.svg)

@@ -5,0 +6,0 @@ TeamCity Reporter for Jest testing framework which groups tests using TeamCity Test Suites.

Sorry, the diff of this file is not supported yet

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