HtmlReporterV2: show correct progress when running a subset of specs

This commit is contained in:
Steve Gravrock
2025-11-26 20:51:02 -08:00
parent d7b1456584
commit b559faec2a
8 changed files with 150 additions and 33 deletions

View File

@@ -123,6 +123,23 @@ getJasmineRequireObj().TreeProcessor = function(j$) {
const nodeStats = this.#stats[node.id];
return node.children ? !nodeStats.willExecute : nodeStats.excluded;
}
numExcludedSpecs(node) {
if (!node) {
return this.numExcludedSpecs(this.topSuite);
} else if (node.children) {
let result = 0;
for (const child of node.children) {
result += this.numExcludedSpecs(child);
}
return result;
} else {
const nodeStats = this.#stats[node.id];
return nodeStats.willExecute ? 0 : 1;
}
}
}
function segmentChildren(node, orderedChildren, stats, executableIndex) {