donobu 5.61.1 → 5.61.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/dist/cli/donobu-cli.d.ts
CHANGED
|
@@ -18,12 +18,20 @@ declare function ensureReporterValueHasJson(value: string): {
|
|
|
18
18
|
* caller to fall back to the rerun's own exit code rather than assume success.
|
|
19
19
|
*/
|
|
20
20
|
declare function countUnexpectedTests(report: DonobuReport): number | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Reconcile a run's process status with its recorded report. The child process
|
|
23
|
+
* is normally authoritative, but wrappers can surface exit 0 even when the
|
|
24
|
+
* report records unexpected failures. Escalate only zero exits so infra and
|
|
25
|
+
* crash codes keep their original signal.
|
|
26
|
+
*/
|
|
27
|
+
declare function reconcileExitCodeWithReport(exitCode: number, report: DonobuReport | null): number;
|
|
21
28
|
/** @internal Exposed for unit tests only — not part of the public API. */
|
|
22
29
|
export declare const _forTesting: {
|
|
23
30
|
countUnexpectedTests: typeof countUnexpectedTests;
|
|
24
31
|
ensureReporterValueHasJson: typeof ensureReporterValueHasJson;
|
|
25
32
|
hasReporterArg: typeof hasReporterArg;
|
|
26
33
|
injectJsonReporterIntoArgs: typeof injectJsonReporterIntoArgs;
|
|
34
|
+
reconcileExitCodeWithReport: typeof reconcileExitCodeWithReport;
|
|
27
35
|
};
|
|
28
36
|
export {};
|
|
29
37
|
//# sourceMappingURL=donobu-cli.d.ts.map
|
package/dist/cli/donobu-cli.js
CHANGED
|
@@ -1512,6 +1512,23 @@ function countUnexpectedTests(report) {
|
|
|
1512
1512
|
const unexpected = stats?.unexpected;
|
|
1513
1513
|
return typeof unexpected === 'number' ? unexpected : undefined;
|
|
1514
1514
|
}
|
|
1515
|
+
/**
|
|
1516
|
+
* Reconcile a run's process status with its recorded report. The child process
|
|
1517
|
+
* is normally authoritative, but wrappers can surface exit 0 even when the
|
|
1518
|
+
* report records unexpected failures. Escalate only zero exits so infra and
|
|
1519
|
+
* crash codes keep their original signal.
|
|
1520
|
+
*/
|
|
1521
|
+
function reconcileExitCodeWithReport(exitCode, report) {
|
|
1522
|
+
if (exitCode !== 0 || !report) {
|
|
1523
|
+
return exitCode;
|
|
1524
|
+
}
|
|
1525
|
+
const unexpected = countUnexpectedTests(report);
|
|
1526
|
+
if (unexpected !== undefined && unexpected > 0) {
|
|
1527
|
+
Logger_1.appLogger.warn(`Run exited 0 but the report records ${unexpected} failed test(s); exiting non-zero.`);
|
|
1528
|
+
return 1;
|
|
1529
|
+
}
|
|
1530
|
+
return exitCode;
|
|
1531
|
+
}
|
|
1515
1532
|
/**
|
|
1516
1533
|
* Find a test entry in a report by title + project name. File paths are
|
|
1517
1534
|
* deliberately not part of the lookup: treatment plans carry absolute paths
|
|
@@ -2038,6 +2055,7 @@ async function runTestCommand(cliArgs) {
|
|
|
2038
2055
|
// guarantee the reporter was deferring for.
|
|
2039
2056
|
await postDeferredSlackFromInitialRun(playwrightOutputDir);
|
|
2040
2057
|
}
|
|
2058
|
+
return reconcileExitCodeWithReport(autoHealOutcome.exitCode, enrichedInitialReport ?? initialDonobuReport);
|
|
2041
2059
|
}
|
|
2042
2060
|
return autoHealOutcome.exitCode;
|
|
2043
2061
|
}
|
|
@@ -2268,5 +2286,6 @@ exports._forTesting = {
|
|
|
2268
2286
|
ensureReporterValueHasJson,
|
|
2269
2287
|
hasReporterArg,
|
|
2270
2288
|
injectJsonReporterIntoArgs,
|
|
2289
|
+
reconcileExitCodeWithReport,
|
|
2271
2290
|
};
|
|
2272
2291
|
//# sourceMappingURL=donobu-cli.js.map
|
|
@@ -18,12 +18,20 @@ declare function ensureReporterValueHasJson(value: string): {
|
|
|
18
18
|
* caller to fall back to the rerun's own exit code rather than assume success.
|
|
19
19
|
*/
|
|
20
20
|
declare function countUnexpectedTests(report: DonobuReport): number | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Reconcile a run's process status with its recorded report. The child process
|
|
23
|
+
* is normally authoritative, but wrappers can surface exit 0 even when the
|
|
24
|
+
* report records unexpected failures. Escalate only zero exits so infra and
|
|
25
|
+
* crash codes keep their original signal.
|
|
26
|
+
*/
|
|
27
|
+
declare function reconcileExitCodeWithReport(exitCode: number, report: DonobuReport | null): number;
|
|
21
28
|
/** @internal Exposed for unit tests only — not part of the public API. */
|
|
22
29
|
export declare const _forTesting: {
|
|
23
30
|
countUnexpectedTests: typeof countUnexpectedTests;
|
|
24
31
|
ensureReporterValueHasJson: typeof ensureReporterValueHasJson;
|
|
25
32
|
hasReporterArg: typeof hasReporterArg;
|
|
26
33
|
injectJsonReporterIntoArgs: typeof injectJsonReporterIntoArgs;
|
|
34
|
+
reconcileExitCodeWithReport: typeof reconcileExitCodeWithReport;
|
|
27
35
|
};
|
|
28
36
|
export {};
|
|
29
37
|
//# sourceMappingURL=donobu-cli.d.ts.map
|
|
@@ -1512,6 +1512,23 @@ function countUnexpectedTests(report) {
|
|
|
1512
1512
|
const unexpected = stats?.unexpected;
|
|
1513
1513
|
return typeof unexpected === 'number' ? unexpected : undefined;
|
|
1514
1514
|
}
|
|
1515
|
+
/**
|
|
1516
|
+
* Reconcile a run's process status with its recorded report. The child process
|
|
1517
|
+
* is normally authoritative, but wrappers can surface exit 0 even when the
|
|
1518
|
+
* report records unexpected failures. Escalate only zero exits so infra and
|
|
1519
|
+
* crash codes keep their original signal.
|
|
1520
|
+
*/
|
|
1521
|
+
function reconcileExitCodeWithReport(exitCode, report) {
|
|
1522
|
+
if (exitCode !== 0 || !report) {
|
|
1523
|
+
return exitCode;
|
|
1524
|
+
}
|
|
1525
|
+
const unexpected = countUnexpectedTests(report);
|
|
1526
|
+
if (unexpected !== undefined && unexpected > 0) {
|
|
1527
|
+
Logger_1.appLogger.warn(`Run exited 0 but the report records ${unexpected} failed test(s); exiting non-zero.`);
|
|
1528
|
+
return 1;
|
|
1529
|
+
}
|
|
1530
|
+
return exitCode;
|
|
1531
|
+
}
|
|
1515
1532
|
/**
|
|
1516
1533
|
* Find a test entry in a report by title + project name. File paths are
|
|
1517
1534
|
* deliberately not part of the lookup: treatment plans carry absolute paths
|
|
@@ -2038,6 +2055,7 @@ async function runTestCommand(cliArgs) {
|
|
|
2038
2055
|
// guarantee the reporter was deferring for.
|
|
2039
2056
|
await postDeferredSlackFromInitialRun(playwrightOutputDir);
|
|
2040
2057
|
}
|
|
2058
|
+
return reconcileExitCodeWithReport(autoHealOutcome.exitCode, enrichedInitialReport ?? initialDonobuReport);
|
|
2041
2059
|
}
|
|
2042
2060
|
return autoHealOutcome.exitCode;
|
|
2043
2061
|
}
|
|
@@ -2268,5 +2286,6 @@ exports._forTesting = {
|
|
|
2268
2286
|
ensureReporterValueHasJson,
|
|
2269
2287
|
hasReporterArg,
|
|
2270
2288
|
injectJsonReporterIntoArgs,
|
|
2289
|
+
reconcileExitCodeWithReport,
|
|
2271
2290
|
};
|
|
2272
2291
|
//# sourceMappingURL=donobu-cli.js.map
|