qase-javascript-commons 2.1.0 → 2.1.1

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.1.1
2
+
3
+ ## What's new
4
+
5
+ Fixed an issue where the state file was not deleted. This resulted in results being uploaded into the same test run.
6
+
1
7
  # qase-javascript-commons@2.1.0
2
8
 
3
9
  ## What's new
@@ -0,0 +1,7 @@
1
+ export declare class CompoundError {
2
+ message: string | undefined;
3
+ stacktrace: string | undefined;
4
+ constructor();
5
+ addMessage(message: string): void;
6
+ addStacktrace(stacktrace: string): void;
7
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompoundError = void 0;
4
+ class CompoundError {
5
+ constructor() {
6
+ this.message = 'CompoundError: One or more errors occurred. ---\n';
7
+ }
8
+ addMessage(message) {
9
+ this.message += `${message}\n--- End of error message ---\n`;
10
+ }
11
+ addStacktrace(stacktrace) {
12
+ if (!this.stacktrace) {
13
+ this.stacktrace = `${indentAll(stacktrace)}\n--- End of stack trace ---\n`;
14
+ return;
15
+ }
16
+ this.stacktrace += `${indentAll(stacktrace)}\n--- End of stack trace ---\n`;
17
+ }
18
+ }
19
+ exports.CompoundError = CompoundError;
20
+ function indentAll(lines) {
21
+ return lines.split('\n').map(x => ' ' + x).join('\n');
22
+ }
@@ -4,3 +4,4 @@ export { type TestStepType, StepType } from './test-step';
4
4
  export { StepStatusEnum } from './step-execution';
5
5
  export { Attachment } from './attachment';
6
6
  export { Report } from './report';
7
+ export { CompoundError } from './error';
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StepStatusEnum = exports.StepType = exports.TestStatusEnum = void 0;
3
+ exports.CompoundError = exports.StepStatusEnum = exports.StepType = exports.TestStatusEnum = void 0;
4
4
  var test_execution_1 = require("./test-execution");
5
5
  Object.defineProperty(exports, "TestStatusEnum", { enumerable: true, get: function () { return test_execution_1.TestStatusEnum; } });
6
6
  var test_step_1 = require("./test-step");
7
7
  Object.defineProperty(exports, "StepType", { enumerable: true, get: function () { return test_step_1.StepType; } });
8
8
  var step_execution_1 = require("./step-execution");
9
9
  Object.defineProperty(exports, "StepStatusEnum", { enumerable: true, get: function () { return step_execution_1.StepStatusEnum; } });
10
+ var error_1 = require("./error");
11
+ Object.defineProperty(exports, "CompoundError", { enumerable: true, get: function () { return error_1.CompoundError; } });
package/dist/qase.js CHANGED
@@ -334,6 +334,7 @@ class QaseReporter {
334
334
  await this.publishFallback();
335
335
  }
336
336
  }
337
+ state_1.StateManager.clearState();
337
338
  }
338
339
  /**
339
340
  * @returns {Promise<void>}
@@ -27,6 +27,7 @@ class StateManager {
27
27
  static setMode(mode) {
28
28
  const state = this.getState();
29
29
  state.Mode = mode;
30
+ state.IsModeChanged = true;
30
31
  this.setState(state);
31
32
  }
32
33
  static setIsModeChanged(isModeChanged) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qase-javascript-commons",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Qase JS Reporters",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",