@reportportal/agent-js-jest
Advanced tools
Comparing version 5.1.0 to 5.1.1
{ | ||
"name": "@reportportal/agent-js-jest", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"description": "A Jest reporter that uploads test results to ReportPortal", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -136,4 +136,6 @@ # @reportportal/agent-js-jest | ||
*Note:* `ReportingApi` does not support tests running in [`concurrent` mode](https://jestjs.io/docs/api#testconcurrentname-fn-timeout) at the moment. | ||
*Note:* Run with the default test files concurrency may lead to inconsistent files attaching. `ReportingApi` also does not support tests running in [`concurrent` mode](https://jestjs.io/docs/api#testconcurrentname-fn-timeout) at the moment. | ||
We are going to fix this behavior in the future. | ||
### Reporting API methods | ||
@@ -140,0 +142,0 @@ |
@@ -204,17 +204,25 @@ /* | ||
const fullName = getFullStepName(test); | ||
const tempStepId = this.tempStepIds.get(fullName); | ||
if (tempStepId === undefined) { | ||
console.error(`Could not finish Test Step - "${fullName}". tempId not found`); | ||
return; | ||
} | ||
switch (test.status) { | ||
case TEST_ITEM_STATUSES.PASSED: | ||
this._finishPassedStep(); | ||
this._finishPassedStep(tempStepId); | ||
break; | ||
case TEST_ITEM_STATUSES.FAILED: | ||
this._finishFailedStep(errorMsg); | ||
this._finishFailedStep(tempStepId, errorMsg); | ||
break; | ||
default: | ||
this._finishSkippedStep(); | ||
this._finishSkippedStep(tempStepId); | ||
} | ||
} | ||
_finishPassedStep() { | ||
_finishPassedStep(tempStepId) { | ||
const status = TEST_ITEM_STATUSES.PASSED; | ||
const { promise } = this.client.finishTestItem(this.tempStepId, { status }); | ||
const { promise } = this.client.finishTestItem(tempStepId, { status }); | ||
@@ -225,3 +233,3 @@ promiseErrorHandler(promise); | ||
_finishFailedStep(failureMessage) { | ||
_finishFailedStep(tempStepId, failureMessage) { | ||
const status = TEST_ITEM_STATUSES.FAILED; | ||
@@ -234,5 +242,5 @@ const description = | ||
this.sendLog({ message: failureMessage, level: LOG_LEVEL.ERROR }); | ||
this.sendLog({ message: failureMessage, level: LOG_LEVEL.ERROR, tempStepId }); | ||
const { promise } = this.client.finishTestItem(this.tempStepId, finishTestObj); | ||
const { promise } = this.client.finishTestItem(tempStepId, finishTestObj); | ||
@@ -243,6 +251,6 @@ promiseErrorHandler(promise); | ||
sendLog({ level = LOG_LEVEL.INFO, message = '', file, time }) { | ||
sendLog({ level = LOG_LEVEL.INFO, message = '', file, time, tempStepId }) { | ||
const newMessage = stripAnsi(message); | ||
const { promise } = this.client.sendLog( | ||
this.tempStepId, | ||
tempStepId === undefined ? this.tempStepId : tempStepId, | ||
{ | ||
@@ -260,3 +268,3 @@ message: newMessage, | ||
_finishSkippedStep() { | ||
_finishSkippedStep(tempStepId) { | ||
const status = 'skipped'; | ||
@@ -268,3 +276,3 @@ const issue = this.reportOptions.skippedIssue === false ? { issueType: 'NOT_ISSUE' } : null; | ||
}; | ||
const { promise } = this.client.finishTestItem(this.tempStepId, finishTestObj); | ||
const { promise } = this.client.finishTestItem(tempStepId, finishTestObj); | ||
@@ -271,0 +279,0 @@ promiseErrorHandler(promise); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
45331
545
173
0