qase-javascript-commons 2.0.5 → 2.0.7

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,15 @@
1
+ # qase-javascript-commons@2.0.7
2
+
3
+ ## What's new
4
+
5
+ Fixed an issue with creating a defect for failed tests when the report generator ignored the `defect` parameter in the configuration.
6
+
7
+ # qase-javascript-commons@2.0.6
8
+
9
+ ## What's new
10
+
11
+ Fixed an issue with a race condition when the reporter added test results to the test run.
12
+
1
13
  # qase-javascript-commons@2.0.5
2
14
 
3
15
  ## What's new
package/dist/qase.js CHANGED
@@ -252,7 +252,7 @@ class QaseReporter {
252
252
  const { frameworkPackage, frameworkName, reporterName, environment, report = {}, testops = {}, } = options;
253
253
  switch (mode) {
254
254
  case options_1.ModeEnum.testops: {
255
- const { api: { token, headers, ...api } = {}, project, run: { title, description, ...run } = {}, plan = {}, batch = {}, useV2, uploadAttachments, } = testops;
255
+ const { api: { token, headers, ...api } = {}, project, run: { title, description, ...run } = {}, plan = {}, batch = {}, useV2, defect, uploadAttachments, } = testops;
256
256
  if (!token) {
257
257
  throw new Error(`Either "testops.api.token" parameter or "${env_1.EnvApiEnum.token}" environment variable is required in "testops" mode`);
258
258
  }
@@ -278,6 +278,7 @@ class QaseReporter {
278
278
  plan,
279
279
  batch,
280
280
  useV2,
281
+ defect,
281
282
  }, apiClient, typeof environment === 'number' ? environment : undefined);
282
283
  }
283
284
  case options_1.ModeEnum.report: {
@@ -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.7",
4
4
  "description": "Qase JS Reporters",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",