donobu 5.61.2 → 5.61.3

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.
@@ -1510,7 +1510,28 @@ async function attemptAutoHealRun(params) {
1510
1510
  function countUnexpectedTests(report) {
1511
1511
  const stats = report.stats;
1512
1512
  const unexpected = stats?.unexpected;
1513
- return typeof unexpected === 'number' ? unexpected : undefined;
1513
+ if (typeof unexpected === 'number') {
1514
+ return unexpected;
1515
+ }
1516
+ const suites = (report.suites ?? []);
1517
+ if (suites.length === 0) {
1518
+ return undefined;
1519
+ }
1520
+ let failures = 0;
1521
+ for (const suite of suites) {
1522
+ for (const spec of (0, reportWalk_1.collectSpecs)(suite)) {
1523
+ for (const test of spec.tests ?? []) {
1524
+ const status = (0, reportWalk_1.statusOf)(test);
1525
+ if (status === 'failed' ||
1526
+ status === 'timedOut' ||
1527
+ status === 'interrupted' ||
1528
+ status === 'unknown') {
1529
+ failures += 1;
1530
+ }
1531
+ }
1532
+ }
1533
+ }
1534
+ return failures;
1514
1535
  }
1515
1536
  /**
1516
1537
  * Reconcile a run's process status with its recorded report. The child process
@@ -1510,7 +1510,28 @@ async function attemptAutoHealRun(params) {
1510
1510
  function countUnexpectedTests(report) {
1511
1511
  const stats = report.stats;
1512
1512
  const unexpected = stats?.unexpected;
1513
- return typeof unexpected === 'number' ? unexpected : undefined;
1513
+ if (typeof unexpected === 'number') {
1514
+ return unexpected;
1515
+ }
1516
+ const suites = (report.suites ?? []);
1517
+ if (suites.length === 0) {
1518
+ return undefined;
1519
+ }
1520
+ let failures = 0;
1521
+ for (const suite of suites) {
1522
+ for (const spec of (0, reportWalk_1.collectSpecs)(suite)) {
1523
+ for (const test of spec.tests ?? []) {
1524
+ const status = (0, reportWalk_1.statusOf)(test);
1525
+ if (status === 'failed' ||
1526
+ status === 'timedOut' ||
1527
+ status === 'interrupted' ||
1528
+ status === 'unknown') {
1529
+ failures += 1;
1530
+ }
1531
+ }
1532
+ }
1533
+ }
1534
+ return failures;
1514
1535
  }
1515
1536
  /**
1516
1537
  * Reconcile a run's process status with its recorded report. The child process
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "donobu",
3
- "version": "5.61.2",
3
+ "version": "5.61.3",
4
4
  "description": "Create browser automations with an LLM agent and replay them as Playwright scripts.",
5
5
  "main": "dist/main.js",
6
6
  "module": "dist/esm/main.js",