qase-javascript-commons 2.0.9 → 2.0.10

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,14 @@
1
+ # qase-javascript-commons@2.0.10
2
+
3
+ ## What's new
4
+
5
+ Fixed an issue with sending test results duplicates when we use the `qase-cypress` reporter.
6
+ Now the reporter will send the test results only once.
7
+
8
+ The Cypress calls the `publish` method multiple times for the same test results because of the Cypress architecture.
9
+ It calls the `publish` method for each test file.
10
+
11
+
1
12
  # qase-javascript-commons@2.0.9
2
13
 
3
14
  ## What's new
@@ -142,6 +142,8 @@ class TestOpsReporter extends abstract_reporter_1.AbstractReporter {
142
142
  if (this.firstIndex < this.results.length) {
143
143
  await this.publishResults(this.results.slice(this.firstIndex));
144
144
  }
145
+ // Clear results because we don't need to send them again then we use Cypress reporter
146
+ this.results.length = 0;
145
147
  if (!this.run.complete) {
146
148
  return;
147
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qase-javascript-commons",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "Qase JS Reporters",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",