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

@@ -112,7 +112,9 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
jasmineStarted(options) {
this.#stateBuilder.jasmineStarted(options);
this.#progress.start(options.totalSpecsDefined);
this.#progress.start(
options.totalSpecsDefined - options.numExcludedSpecs
);
}
suiteStarted(result) {
@@ -228,7 +230,9 @@ jasmineRequire.HtmlReporterV2 = function(j$) {
}
specDone(result) {
this.rootEl.value = this.rootEl.value + 1;
if (result.status !== 'excluded') {
this.rootEl.value = this.rootEl.value + 1;
}
if (result.status === 'failed') {
this.rootEl.classList.add('failed');