qase-javascript-commons 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,3 +1,9 @@
1
+ # qase-javascript-commons@2.0.6
2
+
3
+ ## What's new
4
+
5
+ Fixed an issue with a race condition when the reporter added test results to the test run.
6
+
1
7
  # qase-javascript-commons@2.0.5
2
8
 
3
9
  ## What's new
@@ -63,8 +63,9 @@ class TestOpsReporter extends abstract_reporter_1.AbstractReporter {
63
63
  }
64
64
  const countOfResults = this.batchSize + this.firstIndex;
65
65
  if (this.results.length >= countOfResults) {
66
- await this.publishResults(this.results.slice(this.firstIndex, countOfResults));
66
+ const firstIndex = this.firstIndex;
67
67
  this.firstIndex = countOfResults;
68
+ await this.publishResults(this.results.slice(firstIndex, countOfResults));
68
69
  }
69
70
  }
70
71
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qase-javascript-commons",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Qase JS Reporters",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",