Skip to content

Commit

Permalink
fix(test-runner): show suites for summaryReporter({ flatten: true }) (#…
Browse files Browse the repository at this point in the history
…2773)

* fix(test-runner): show suites for summaryReporter({ flatten: true })

* docs: create heavy-pianos-beam.md
  • Loading branch information
bennypowers authored Aug 9, 2024
1 parent 55ce996 commit 6914f3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/heavy-pianos-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@web/test-runner": patch
---

Show suites names for `summaryReporter` when `flatten` option is true
9 changes: 8 additions & 1 deletion packages/test-runner/src/reporter/summaryReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ export function summaryReporter(opts: Options): Reporter {
) {
const browserName = browser?.name ? ` ${dim(`[${browser.name}]`)}` : '';
for (const result of results?.tests ?? []) {
log(logger, result.name, result.passed, result.skipped, prefix, browserName);
log(
logger,
flatten ? `${prefix ?? ''} ${result.name}` : result.name,
result.passed,
result.skipped,
prefix,
browserName,
);
}

for (const suite of results?.suites ?? []) {
Expand Down

0 comments on commit 6914f3b

Please sign in to comment.