qase-javascript-commons 2.4.0 → 2.4.2

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/README.md CHANGED
@@ -54,10 +54,12 @@ All configuration options are listed in the table below:
54
54
  | Qase test run description | `testops.run.description` | `QASE_TESTOPS_RUN_DESCRIPTION` | `<Framework name> automated run` | No | Any string |
55
55
  | Qase test run complete | `testops.run.complete` | `QASE_TESTOPS_RUN_COMPLETE` | `True` | | `True`, `False` |
56
56
  | Array of tags to be added to the test run | `testops.run.tags` | `QASE_TESTOPS_RUN_TAGS` | `[]` | No | Array of strings |
57
+ | External link to associate with test run (e.g., Jira ticket) | `testops.run.externalLink` | `QASE_TESTOPS_RUN_EXTERNAL_LINK` | undefined | No | JSON object with `type` (`jiraCloud` or `jiraServer`) and `link` (e.g., `PROJ-123`) |
57
58
  | Qase test plan ID | `testops.plan.id` | `QASE_TESTOPS_PLAN_ID` | undefined | No | Any integer |
58
59
  | Size of batch for sending test results | `testops.batch.size` | `QASE_TESTOPS_BATCH_SIZE` | `200` | No | Any integer |
59
60
  | Enable defects for failed test cases | `testops.defect` | `QASE_TESTOPS_DEFECT` | `False` | No | `True`, `False` |
60
61
  | Enable/disable attachment uploads | `testops.uploadAttachments` | `QASE_TESTOPS_UPLOAD_ATTACHMENTS` | `true` | No | `True`, `False` |
62
+ | Filter test results by status (comma-separated list of statuses to exclude from reporting) | `testops.statusFilter` | `QASE_TESTOPS_STATUS_FILTER` | undefined | No | Array of strings (`passed`, `failed`, `skipped`, `invalid`) |
61
63
  | Configuration values to create/find in groups (format: `group1=value1,group2=value2`) | `testops.configurations.values` | `QASE_TESTOPS_CONFIGURATIONS_VALUES` | undefined | No | Comma-separated key=value pairs |
62
64
  | Create configuration groups if they don't exist | `testops.configurations.createIfNotExists` | `QASE_TESTOPS_CONFIGURATIONS_CREATE_IF_NOT_EXISTS` | `false` | No | `True`, `False` |
63
65
 
@@ -88,10 +90,16 @@ All configuration options are listed in the table below:
88
90
  "title": "Regress run",
89
91
  "description": "Regress run description",
90
92
  "complete": true,
91
- "tags": ["tag1", "tag2"]
93
+ "tags": ["tag1", "tag2"],
94
+ "externalLink": {
95
+ "type": "jiraCloud",
96
+ "link": "PROJ-123"
97
+ }
92
98
  },
93
99
  "defect": false,
94
100
  "project": "<project_code>",
101
+ "uploadAttachments": true,
102
+ "statusFilter": ["passed", "skipped"],
95
103
  "batch": {
96
104
  "size": 100
97
105
  },
@@ -111,3 +119,16 @@ All configuration options are listed in the table below:
111
119
  }
112
120
  }
113
121
  ```
122
+
123
+ ### Environment Variables Example:
124
+
125
+ ```bash
126
+ # Set external link for Jira Cloud
127
+ export QASE_TESTOPS_RUN_EXTERNAL_LINK='{"type":"jiraCloud","link":"PROJ-123"}'
128
+
129
+ # Set external link for Jira Server
130
+ export QASE_TESTOPS_RUN_EXTERNAL_LINK='{"type":"jiraServer","link":"PROJ-456"}'
131
+
132
+ # Filter out test results with specific statuses
133
+ export QASE_TESTOPS_STATUS_FILTER="passed,failed"
134
+ ```
package/changelog.md CHANGED
@@ -1,3 +1,21 @@
1
+ # qase-javascript-commons@2.4.2
2
+
3
+ ## What's new
4
+
5
+ Added support for status filter in the test run.
6
+
7
+ You can now filter out test results by status.
8
+ The status filter is specified in the `testops.statusFilter` configuration option.
9
+ The status filter is a comma-separated list of statuses to exclude from reporting.
10
+ The statuses are: `passed`, `failed`, `skipped`, `invalid`.
11
+ The status filter is applied to the test results before they are sent to Qase.
12
+
13
+ # qase-javascript-commons@2.4.1
14
+
15
+ ## What's new
16
+
17
+ Added support for external links in the test run.
18
+
1
19
  # qase-javascript-commons@2.3.6
2
20
 
3
21
  ## What's new
@@ -74,6 +74,22 @@ class ClientV1 {
74
74
  throw new qase_error_1.QaseError('Failed to create test run');
75
75
  }
76
76
  this.logger.logDebug(`Test run created: ${JSON.stringify(data)}`);
77
+ if (this.config.run.externalLink && data.result.id) {
78
+ // Map our enum values to API enum values
79
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
80
+ const apiType = this.config.run.externalLink.type === 'jiraCloud'
81
+ ? qase_api_client_1.RunexternalIssuesTypeEnum.CLOUD
82
+ : qase_api_client_1.RunexternalIssuesTypeEnum.SERVER;
83
+ await this.runClient.runUpdateExternalIssue(this.config.project, {
84
+ type: apiType,
85
+ links: [
86
+ {
87
+ run_id: data.result.id,
88
+ external_issue: this.config.run.externalLink.link,
89
+ },
90
+ ],
91
+ });
92
+ }
77
93
  return data.result.id;
78
94
  }
79
95
  catch (error) {
@@ -1,5 +1,6 @@
1
1
  import { ModeEnum } from '../options';
2
2
  import { DriverEnum, FormatEnum } from '../writer';
3
+ import { ExternalLinkType } from '../models/config/TestOpsOptionsType';
3
4
  /**
4
5
  * @type {JSONSchemaType<ConfigType>}
5
6
  */
@@ -85,6 +86,20 @@ export declare const configValidationSchema: {
85
86
  };
86
87
  nullable: boolean;
87
88
  };
89
+ externalLink: {
90
+ type: string;
91
+ nullable: boolean;
92
+ properties: {
93
+ type: {
94
+ type: string;
95
+ enum: ExternalLinkType[];
96
+ };
97
+ link: {
98
+ type: string;
99
+ };
100
+ };
101
+ required: string[];
102
+ };
88
103
  };
89
104
  };
90
105
  plan: {
@@ -139,6 +154,13 @@ export declare const configValidationSchema: {
139
154
  };
140
155
  required: string[];
141
156
  };
157
+ statusFilter: {
158
+ type: string;
159
+ items: {
160
+ type: string;
161
+ };
162
+ nullable: boolean;
163
+ };
142
164
  };
143
165
  };
144
166
  report: {
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.configValidationSchema = void 0;
4
4
  const options_1 = require("../options");
5
5
  const writer_1 = require("../writer");
6
+ const TestOpsOptionsType_1 = require("../models/config/TestOpsOptionsType");
6
7
  /**
7
8
  * @type {JSONSchemaType<ConfigType>}
8
9
  */
@@ -88,6 +89,20 @@ exports.configValidationSchema = {
88
89
  },
89
90
  nullable: true,
90
91
  },
92
+ externalLink: {
93
+ type: 'object',
94
+ nullable: true,
95
+ properties: {
96
+ type: {
97
+ type: 'string',
98
+ enum: [TestOpsOptionsType_1.ExternalLinkType.JIRA_CLOUD, TestOpsOptionsType_1.ExternalLinkType.JIRA_SERVER],
99
+ },
100
+ link: {
101
+ type: 'string',
102
+ },
103
+ },
104
+ required: ['type', 'link'],
105
+ },
91
106
  },
92
107
  },
93
108
  plan: {
@@ -142,6 +157,13 @@ exports.configValidationSchema = {
142
157
  },
143
158
  required: ['values'],
144
159
  },
160
+ statusFilter: {
161
+ type: 'array',
162
+ items: {
163
+ type: 'string',
164
+ },
165
+ nullable: true,
166
+ },
145
167
  },
146
168
  },
147
169
  report: {
@@ -15,7 +15,8 @@ export declare enum EnvEnum {
15
15
  export declare enum EnvTestOpsEnum {
16
16
  project = "QASE_TESTOPS_PROJECT",
17
17
  uploadAttachments = "QASE_TESTOPS_UPLOAD_ATTACHMENTS",
18
- defect = "QASE_TESTOPS_DEFECT"
18
+ defect = "QASE_TESTOPS_DEFECT",
19
+ statusFilter = "QASE_TESTOPS_STATUS_FILTER"
19
20
  }
20
21
  /**
21
22
  * @enum {string}
@@ -32,7 +33,8 @@ export declare enum EnvRunEnum {
32
33
  title = "QASE_TESTOPS_RUN_TITLE",
33
34
  description = "QASE_TESTOPS_RUN_DESCRIPTION",
34
35
  complete = "QASE_TESTOPS_RUN_COMPLETE",
35
- tags = "QASE_TESTOPS_RUN_TAGS"
36
+ tags = "QASE_TESTOPS_RUN_TAGS",
37
+ externalLink = "QASE_TESTOPS_RUN_EXTERNAL_LINK"
36
38
  }
37
39
  /**
38
40
  * @enum {string}
@@ -21,6 +21,7 @@ var EnvTestOpsEnum;
21
21
  EnvTestOpsEnum["project"] = "QASE_TESTOPS_PROJECT";
22
22
  EnvTestOpsEnum["uploadAttachments"] = "QASE_TESTOPS_UPLOAD_ATTACHMENTS";
23
23
  EnvTestOpsEnum["defect"] = "QASE_TESTOPS_DEFECT";
24
+ EnvTestOpsEnum["statusFilter"] = "QASE_TESTOPS_STATUS_FILTER";
24
25
  })(EnvTestOpsEnum || (exports.EnvTestOpsEnum = EnvTestOpsEnum = {}));
25
26
  /**
26
27
  * @enum {string}
@@ -40,6 +41,7 @@ var EnvRunEnum;
40
41
  EnvRunEnum["description"] = "QASE_TESTOPS_RUN_DESCRIPTION";
41
42
  EnvRunEnum["complete"] = "QASE_TESTOPS_RUN_COMPLETE";
42
43
  EnvRunEnum["tags"] = "QASE_TESTOPS_RUN_TAGS";
44
+ EnvRunEnum["externalLink"] = "QASE_TESTOPS_RUN_EXTERNAL_LINK";
43
45
  })(EnvRunEnum || (exports.EnvRunEnum = EnvRunEnum = {}));
44
46
  /**
45
47
  * @enum {string}
@@ -16,6 +16,7 @@ const envToConfig = (env) => ({
16
16
  testops: {
17
17
  project: env[env_enum_1.EnvTestOpsEnum.project],
18
18
  uploadAttachments: env[env_enum_1.EnvTestOpsEnum.uploadAttachments],
19
+ statusFilter: env[env_enum_1.EnvTestOpsEnum.statusFilter]?.split(',').map(status => status.trim()) ?? undefined,
19
20
  api: {
20
21
  token: env[env_enum_1.EnvApiEnum.token],
21
22
  host: env[env_enum_1.EnvApiEnum.host],
@@ -26,6 +27,25 @@ const envToConfig = (env) => ({
26
27
  description: env[env_enum_1.EnvRunEnum.description],
27
28
  complete: env[env_enum_1.EnvRunEnum.complete],
28
29
  tags: env[env_enum_1.EnvRunEnum.tags]?.split(',').map(tag => tag.trim()) ?? [],
30
+ externalLink: env[env_enum_1.EnvRunEnum.externalLink] ? (() => {
31
+ try {
32
+ const externalLinkValue = env[env_enum_1.EnvRunEnum.externalLink];
33
+ if (!externalLinkValue)
34
+ return undefined;
35
+ const parsed = JSON.parse(externalLinkValue);
36
+ // Validate that type is a valid ExternalLinkType value
37
+ if (parsed.type !== 'jiraCloud' && parsed.type !== 'jiraServer') {
38
+ return undefined;
39
+ }
40
+ return {
41
+ type: parsed.type,
42
+ link: parsed.link,
43
+ };
44
+ }
45
+ catch {
46
+ return undefined;
47
+ }
48
+ })() : undefined,
29
49
  },
30
50
  plan: {
31
51
  id: env[env_enum_1.EnvPlanEnum.id],
@@ -11,6 +11,7 @@ export interface EnvType {
11
11
  [EnvTestOpsEnum.project]?: string;
12
12
  [EnvTestOpsEnum.uploadAttachments]?: boolean;
13
13
  [EnvTestOpsEnum.defect]?: boolean;
14
+ [EnvTestOpsEnum.statusFilter]?: string;
14
15
  [EnvApiEnum.token]?: string;
15
16
  [EnvApiEnum.host]?: string;
16
17
  [EnvRunEnum.id]?: number;
@@ -18,6 +19,7 @@ export interface EnvType {
18
19
  [EnvRunEnum.description]?: string;
19
20
  [EnvRunEnum.complete]?: boolean;
20
21
  [EnvRunEnum.tags]?: string;
22
+ [EnvRunEnum.externalLink]?: string;
21
23
  [EnvPlanEnum.id]?: number;
22
24
  [EnvBatchEnum.size]?: number;
23
25
  [EnvConfigurationsEnum.values]?: string;
@@ -48,6 +48,10 @@ exports.envValidationSchema = {
48
48
  type: 'boolean',
49
49
  nullable: true,
50
50
  },
51
+ [env_enum_1.EnvTestOpsEnum.statusFilter]: {
52
+ type: 'string',
53
+ nullable: true,
54
+ },
51
55
  [env_enum_1.EnvApiEnum.token]: {
52
56
  type: 'string',
53
57
  nullable: true,
@@ -76,6 +80,10 @@ exports.envValidationSchema = {
76
80
  type: 'string',
77
81
  nullable: true,
78
82
  },
83
+ [env_enum_1.EnvRunEnum.externalLink]: {
84
+ type: 'string',
85
+ nullable: true,
86
+ },
79
87
  [env_enum_1.EnvPlanEnum.id]: {
80
88
  type: 'number',
81
89
  nullable: true,
package/dist/index.d.ts CHANGED
@@ -9,4 +9,5 @@ export * from './writer';
9
9
  export * from './utils/get-package-version';
10
10
  export * from './utils/mimeTypes';
11
11
  export * from './utils/signature';
12
+ export * from './utils/test-status-utils';
12
13
  export * from './steps/step';
package/dist/index.js CHANGED
@@ -25,4 +25,5 @@ __exportStar(require("./writer"), exports);
25
25
  __exportStar(require("./utils/get-package-version"), exports);
26
26
  __exportStar(require("./utils/mimeTypes"), exports);
27
27
  __exportStar(require("./utils/signature"), exports);
28
+ __exportStar(require("./utils/test-status-utils"), exports);
28
29
  __exportStar(require("./steps/step"), exports);
@@ -7,6 +7,7 @@ export interface TestOpsOptionsType {
7
7
  batch?: TestOpsBatchType;
8
8
  defect?: boolean | undefined;
9
9
  configurations?: TestOpsConfigurationType | undefined;
10
+ statusFilter?: string[] | undefined;
10
11
  }
11
12
  export interface TestOpsConfigurationType {
12
13
  values: TestOpsConfigurationValueType[];
@@ -16,12 +17,21 @@ export interface TestOpsConfigurationValueType {
16
17
  name: string;
17
18
  value: string;
18
19
  }
20
+ export declare enum ExternalLinkType {
21
+ JIRA_CLOUD = "jiraCloud",
22
+ JIRA_SERVER = "jiraServer"
23
+ }
24
+ export interface TestOpsExternalLinkType {
25
+ type: ExternalLinkType;
26
+ link: string;
27
+ }
19
28
  export interface TestOpsRunType {
20
29
  id?: number | undefined;
21
30
  title?: string;
22
31
  description?: string;
23
32
  complete?: boolean | undefined;
24
33
  tags?: string[] | undefined;
34
+ externalLink?: TestOpsExternalLinkType | undefined;
25
35
  }
26
36
  export interface TestOpsPlanType {
27
37
  id?: number | undefined;
@@ -1,2 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExternalLinkType = void 0;
4
+ var ExternalLinkType;
5
+ (function (ExternalLinkType) {
6
+ ExternalLinkType["JIRA_CLOUD"] = "jiraCloud";
7
+ ExternalLinkType["JIRA_SERVER"] = "jiraServer";
8
+ })(ExternalLinkType || (exports.ExternalLinkType = ExternalLinkType = {}));
@@ -6,3 +6,4 @@ export { Attachment } from './attachment';
6
6
  export { Report } from './report';
7
7
  export { CompoundError } from './error';
8
8
  export { ConfigurationGroup, ConfigurationItem, ConfigurationGroupResponse } from './configuration';
9
+ export { ExternalLinkType, TestOpsOptionsType, TestOpsApiType, TestOpsRunType, TestOpsPlanType, TestOpsBatchType, TestOpsConfigurationType, TestOpsConfigurationValueType, TestOpsExternalLinkType } from './config/TestOpsOptionsType';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CompoundError = exports.StepStatusEnum = exports.StepType = exports.TestStepType = exports.TestStatusEnum = exports.TestExecution = exports.TestResultType = void 0;
3
+ exports.ExternalLinkType = exports.CompoundError = exports.StepStatusEnum = exports.StepType = exports.TestStepType = exports.TestStatusEnum = exports.TestExecution = exports.TestResultType = void 0;
4
4
  var test_result_1 = require("./test-result");
5
5
  Object.defineProperty(exports, "TestResultType", { enumerable: true, get: function () { return test_result_1.TestResultType; } });
6
6
  var test_execution_1 = require("./test-execution");
@@ -13,3 +13,5 @@ var step_execution_1 = require("./step-execution");
13
13
  Object.defineProperty(exports, "StepStatusEnum", { enumerable: true, get: function () { return step_execution_1.StepStatusEnum; } });
14
14
  var error_1 = require("./error");
15
15
  Object.defineProperty(exports, "CompoundError", { enumerable: true, get: function () { return error_1.CompoundError; } });
16
+ var TestOpsOptionsType_1 = require("./config/TestOpsOptionsType");
17
+ Object.defineProperty(exports, "ExternalLinkType", { enumerable: true, get: function () { return TestOpsOptionsType_1.ExternalLinkType; } });
package/dist/qase.d.ts CHANGED
@@ -69,6 +69,11 @@ export declare class QaseReporter implements ReporterInterface {
69
69
  * @param {TestResultType} result
70
70
  */
71
71
  addTestResult(result: TestResultType): Promise<void>;
72
+ /**
73
+ * @param {TestResultType} result
74
+ * @private
75
+ */
76
+ private shouldFilterResult;
72
77
  /**
73
78
  * @param {TestResultType} result
74
79
  * @private
package/dist/qase.js CHANGED
@@ -281,6 +281,11 @@ class QaseReporter {
281
281
  */
282
282
  async addTestResult(result) {
283
283
  if (!this.disabled) {
284
+ // Check if result should be filtered out based on status
285
+ if (this.shouldFilterResult(result)) {
286
+ this.logger.logDebug(`Filtering out test result with status: ${result.execution.status}`);
287
+ return;
288
+ }
284
289
  await this.startTestRunOperation;
285
290
  this.logTestItem(result);
286
291
  if (this.useFallback) {
@@ -308,6 +313,23 @@ class QaseReporter {
308
313
  }
309
314
  }
310
315
  }
316
+ /**
317
+ * @param {TestResultType} result
318
+ * @private
319
+ */
320
+ shouldFilterResult(result) {
321
+ const statusFilter = this.options.testops?.statusFilter;
322
+ if (!statusFilter || statusFilter.length === 0) {
323
+ return false;
324
+ }
325
+ // Convert TestStatusEnum to string for comparison
326
+ const statusString = result.execution.status.toString();
327
+ this.logger.logDebug(`Checking filter: status="${statusString}", filter=${JSON.stringify(statusFilter)}`);
328
+ // Check if the status is in the filter list
329
+ const shouldFilter = statusFilter.includes(statusString);
330
+ this.logger.logDebug(`Filter result: ${shouldFilter ? 'FILTERED' : 'NOT FILTERED'}`);
331
+ return shouldFilter;
332
+ }
311
333
  /**
312
334
  * @param {TestResultType} result
313
335
  * @private
@@ -0,0 +1,8 @@
1
+ import { TestStatusEnum } from '../models/test-execution';
2
+ /**
3
+ * Determines test status based on error type
4
+ * @param error - Error object or null
5
+ * @param originalStatus - Original test status from test runner
6
+ * @returns TestStatusEnum - failed for assertion errors, invalid for other errors
7
+ */
8
+ export declare function determineTestStatus(error: Error | null, originalStatus: string): TestStatusEnum;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.determineTestStatus = void 0;
4
+ const test_execution_1 = require("../models/test-execution");
5
+ /**
6
+ * Determines test status based on error type
7
+ * @param error - Error object or null
8
+ * @param originalStatus - Original test status from test runner
9
+ * @returns TestStatusEnum - failed for assertion errors, invalid for other errors
10
+ */
11
+ function determineTestStatus(error, originalStatus) {
12
+ // If no error, return the original status
13
+ if (!error) {
14
+ return mapOriginalStatus(originalStatus);
15
+ }
16
+ // Check if it's an assertion error
17
+ if (isAssertionError(error)) {
18
+ return test_execution_1.TestStatusEnum.failed;
19
+ }
20
+ // For all other errors, return invalid
21
+ return test_execution_1.TestStatusEnum.invalid;
22
+ }
23
+ exports.determineTestStatus = determineTestStatus;
24
+ /**
25
+ * Checks if error is an assertion error
26
+ * @param error - Error object
27
+ * @returns boolean - true if assertion error
28
+ */
29
+ function isAssertionError(error) {
30
+ const errorMessage = error.message.toLowerCase();
31
+ const errorStack = error.stack?.toLowerCase() || '';
32
+ // Common assertion error patterns
33
+ const assertionPatterns = [
34
+ 'expect',
35
+ 'assert',
36
+ 'matcher',
37
+ 'assertion',
38
+ 'expected',
39
+ 'actual',
40
+ 'to be',
41
+ 'to equal',
42
+ 'to contain',
43
+ 'to match',
44
+ 'to throw',
45
+ 'to be called',
46
+ 'to have been called',
47
+ 'test failed',
48
+ 'expectation failed',
49
+ 'assertion failed'
50
+ ];
51
+ // Non-assertion error patterns that should be invalid
52
+ const nonAssertionPatterns = [
53
+ 'syntaxerror',
54
+ 'referenceerror',
55
+ 'typeerror',
56
+ 'network',
57
+ 'timeout',
58
+ 'connection',
59
+ 'http',
60
+ 'fetch',
61
+ 'axios',
62
+ 'cors',
63
+ 'permission',
64
+ 'access denied',
65
+ 'unauthorized',
66
+ 'forbidden',
67
+ 'not found',
68
+ 'server error',
69
+ 'internal error'
70
+ ];
71
+ // Check for non-assertion patterns first
72
+ const hasNonAssertionPattern = nonAssertionPatterns.some(pattern => errorMessage.includes(pattern) || errorStack.includes(pattern));
73
+ if (hasNonAssertionPattern) {
74
+ return false;
75
+ }
76
+ // Check error message and stack for assertion patterns
77
+ const hasAssertionPattern = assertionPatterns.some(pattern => errorMessage.includes(pattern) || errorStack.includes(pattern));
78
+ // Check for specific error types that indicate assertions
79
+ const isJestMatcherError = error.name === 'Error' &&
80
+ (errorMessage.includes('expect') || errorMessage.includes('matcher'));
81
+ const isChaiAssertionError = error.name === 'AssertionError';
82
+ const isPlaywrightAssertionError = error.name === 'Error' &&
83
+ (errorMessage.includes('expect') || errorMessage.includes('assert'));
84
+ return hasAssertionPattern || isJestMatcherError || isChaiAssertionError || isPlaywrightAssertionError;
85
+ }
86
+ /**
87
+ * Maps original test runner status to TestStatusEnum
88
+ * @param originalStatus - Original status from test runner
89
+ * @returns TestStatusEnum
90
+ */
91
+ function mapOriginalStatus(originalStatus) {
92
+ const statusMap = {
93
+ 'passed': test_execution_1.TestStatusEnum.passed,
94
+ 'failed': test_execution_1.TestStatusEnum.failed,
95
+ 'skipped': test_execution_1.TestStatusEnum.skipped,
96
+ 'disabled': test_execution_1.TestStatusEnum.disabled,
97
+ 'pending': test_execution_1.TestStatusEnum.skipped,
98
+ 'todo': test_execution_1.TestStatusEnum.disabled,
99
+ 'focused': test_execution_1.TestStatusEnum.passed,
100
+ 'timedOut': test_execution_1.TestStatusEnum.failed,
101
+ 'interrupted': test_execution_1.TestStatusEnum.failed,
102
+ };
103
+ return statusMap[originalStatus] || test_execution_1.TestStatusEnum.skipped;
104
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qase-javascript-commons",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "Qase JS Reporters",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",