@testomatio/reporter 1.4.6-proxy-support → 1.4.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/lib/pipe/testomatio.js +1 -1
- package/lib/utils/utils.js +5 -0
- package/package.json +1 -1
package/lib/pipe/testomatio.js
CHANGED
|
@@ -350,7 +350,7 @@ class TestomatioPipe {
|
|
|
350
350
|
if (!this.runId) return;
|
|
351
351
|
|
|
352
352
|
// add test ID + run ID
|
|
353
|
-
data.rid = `${this.runId}-${data.rid}`;
|
|
353
|
+
if (data.rid) data.rid = `${this.runId}-${data.rid}`;
|
|
354
354
|
data.api_key = this.apiKey;
|
|
355
355
|
data.create = this.createNewTests;
|
|
356
356
|
|
package/lib/utils/utils.js
CHANGED
|
@@ -106,6 +106,7 @@ const fetchSourceCodeFromStackTrace = (stack = '') => {
|
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
const TEST_ID_REGEX = /@T([\w\d]{8})/;
|
|
109
|
+
const SUITE_ID_REGEX = /@[Ss]([\w\d]{8})/;
|
|
109
110
|
|
|
110
111
|
const fetchIdFromCode = (code, opts = {}) => {
|
|
111
112
|
const comments = code
|
|
@@ -133,6 +134,10 @@ const fetchIdFromOutput = output => {
|
|
|
133
134
|
return lines.find(c => c.match(TEST_ID_REGEX))?.match(TEST_ID_REGEX)?.[1];
|
|
134
135
|
};
|
|
135
136
|
|
|
137
|
+
const fetchSuiteId = (title) => {
|
|
138
|
+
return title.find(c => c.match(/@s/))?.match(TEST_ID_REGEX)?.[1];
|
|
139
|
+
};
|
|
140
|
+
|
|
136
141
|
const fetchSourceCode = (contents, opts = {}) => {
|
|
137
142
|
if (!opts.title && !opts.line) return '';
|
|
138
143
|
|