qase-javascript-commons 2.5.7 → 2.5.9
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.5.9
|
|
2
|
+
|
|
3
|
+
## Bug fixes
|
|
4
|
+
|
|
5
|
+
- Fixed shallow copy bug in `addTestResult` when splitting multi-ID test results. The `execution` object is now deep-copied, preventing shared reference mutation that zeroed out `duration` for all copies.
|
|
6
|
+
|
|
7
|
+
# qase-javascript-commons@2.5.8
|
|
8
|
+
|
|
9
|
+
## Bug fixes
|
|
10
|
+
|
|
11
|
+
- Fixed stale reporter state in long-lived Node.js processes (VS Code Playwright extension, Jest watch mode). The singleton `QaseReporter` now resets per-run state (`runId`, `firstIndex`, `results`, `disabled`, `useFallback`) in `startTestRun()`, so subsequent test runs within the same process work correctly.
|
|
12
|
+
|
|
1
13
|
# qase-javascript-commons@2.5.7
|
|
2
14
|
|
|
3
15
|
## Bug fixes
|
package/dist/qase.js
CHANGED
|
@@ -52,7 +52,7 @@ class AbstractReporter {
|
|
|
52
52
|
// if we have multiple ids, we need to create multiple test results and set duration to 0 for all but the first one
|
|
53
53
|
let firstCase = true;
|
|
54
54
|
for (const id of result.testops_id) {
|
|
55
|
-
const testResultCopy = { ...result };
|
|
55
|
+
const testResultCopy = { ...result, execution: { ...result.execution } };
|
|
56
56
|
testResultCopy.testops_id = id;
|
|
57
57
|
testResultCopy.id = (0, uuid_1.v4)();
|
|
58
58
|
if (!firstCase) {
|
|
@@ -72,6 +72,13 @@ class TestOpsMultiReporter extends abstract_reporter_1.AbstractReporter {
|
|
|
72
72
|
return opts;
|
|
73
73
|
}
|
|
74
74
|
async startTestRun() {
|
|
75
|
+
this.runIds.clear();
|
|
76
|
+
this.isTestRunReady = false;
|
|
77
|
+
this.results = [];
|
|
78
|
+
for (const code of this.projectCodes) {
|
|
79
|
+
this.projectQueues.set(code, []);
|
|
80
|
+
this.firstIndexByProject.set(code, 0);
|
|
81
|
+
}
|
|
75
82
|
await this.checkOrCreateTestRuns();
|
|
76
83
|
}
|
|
77
84
|
async addTestResult(result) {
|
|
@@ -47,6 +47,10 @@ class TestOpsReporter extends abstract_reporter_1.AbstractReporter {
|
|
|
47
47
|
* @returns {Promise<void>}
|
|
48
48
|
*/
|
|
49
49
|
async startTestRun() {
|
|
50
|
+
this.runId = undefined;
|
|
51
|
+
this.isTestRunReady = false;
|
|
52
|
+
this.firstIndex = 0;
|
|
53
|
+
this.results = [];
|
|
50
54
|
await this.checkOrCreateTestRun();
|
|
51
55
|
}
|
|
52
56
|
/**
|