jest-teamcity
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -7,6 +7,18 @@ /** | ||
module.exports = result => { | ||
module.exports = function(result) { | ||
const flowId = process.env.TEAMCITY_FLOWID || process.pid.toString(); | ||
const teamCityVersion = process.env.TEAMCITY_VERSION; | ||
// Constructor call means usage as a Jest reporter | ||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new.target | ||
if (new.target) { | ||
if (teamCityVersion) { | ||
this.onTestResult = (_, result) => { | ||
formatter.formatReport([result], process.cwd(), flowId) | ||
} | ||
} | ||
return | ||
} | ||
if (teamCityVersion) { | ||
@@ -13,0 +25,0 @@ formatter.formatReport(result.testResults, process.cwd(), flowId); |
{ | ||
"name": "jest-teamcity", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Teamcity Reporter for Jest Testing framework", | ||
@@ -11,3 +11,3 @@ "homepage": "https://github.com/itereshchenkov/jest-teamcity", | ||
"devDependencies": { | ||
"jest": "^24.9.0", | ||
"jest": "^25.1.0", | ||
"prettier": "^1.19.1" | ||
@@ -14,0 +14,0 @@ }, |
@@ -21,3 +21,3 @@ # jest-teamcity | ||
"jest": { | ||
"testResultsProcessor": "jest-teamcity" | ||
"reporters": ["default", "jest-teamcity"] | ||
} | ||
@@ -34,5 +34,2 @@ ``` | ||
To enable TeamCity reporter, use the following option: | ||
`jest --teamcity` | ||
Package.json example: | ||
@@ -39,0 +36,0 @@ ```javascript |
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
19941
355
43