Skip to content

Commit 6914f3b

Browse files
authored
fix(test-runner): show suites for summaryReporter({ flatten: true }) (#2773)
* fix(test-runner): show suites for summaryReporter({ flatten: true }) * docs: create heavy-pianos-beam.md
1 parent 55ce996 commit 6914f3b

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.changeset/heavy-pianos-beam.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@web/test-runner": patch
3+
---
4+
5+
Show suites names for `summaryReporter` when `flatten` option is true

packages/test-runner/src/reporter/summaryReporter.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@ export function summaryReporter(opts: Options): Reporter {
5151
) {
5252
const browserName = browser?.name ? ` ${dim(`[${browser.name}]`)}` : '';
5353
for (const result of results?.tests ?? []) {
54-
log(logger, result.name, result.passed, result.skipped, prefix, browserName);
54+
log(
55+
logger,
56+
flatten ? `${prefix ?? ''} ${result.name}` : result.name,
57+
result.passed,
58+
result.skipped,
59+
prefix,
60+
browserName,
61+
);
5562
}
5663

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

0 commit comments

Comments
 (0)