From d6c2d18e9d7f235220bac69ca0ab5efb1e7428d7 Mon Sep 17 00:00:00 2001 From: Iceal L <125531935+icdemo@users.noreply.github.com> Date: Thu, 14 Aug 2025 16:02:36 -0700 Subject: [PATCH] early return for empty suites in get-report.ts --- src/report/get-report.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/report/get-report.ts b/src/report/get-report.ts index 5ea44fe..bd08fb2 100644 --- a/src/report/get-report.ts +++ b/src/report/get-report.ts @@ -195,6 +195,12 @@ function getSuitesReport(tr: TestRunResult, runIndex: number, options: ReportOpt const sections: string[] = [] const suites = options.listSuites === 'failed' ? tr.failedSuites : tr.suites + // suites gets filtered by options.listSuites, if the suites are empty, it should exit. + // currently it still displays all the non-failed items, making the report very verbose. + if (suites.length === 0) { + return sections + } + if (options.listSuites !== 'none') { const trSlug = makeRunSlug(runIndex, options) const nameLink = `${tr.path}`