Skip to content

Commit dc5bce2

Browse files
CopilotSkn0tt
andcommitted
Fix shard index check to handle index 0 correctly
Co-authored-by: Skn0tt <14912729+Skn0tt@users.noreply.github.com>
1 parent 59228dc commit dc5bce2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/playwright/src/reporters/markdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class MarkdownReporter implements Reporter {
7979
if (this._options.shardDurationThreshold && result.shards) {
8080
for (const shard of result.shards) {
8181
if (shard.duration > this._options.shardDurationThreshold) {
82-
const shardLabel = shard.shardIndex ? `Shard ${shard.shardIndex}` : 'Shard';
82+
const shardLabel = shard.shardIndex !== undefined ? `Shard ${shard.shardIndex}` : 'Shard';
8383
const durationMins = Math.round(shard.duration / 60000);
8484
const thresholdMins = Math.round(this._options.shardDurationThreshold / 60000);
8585
lines.push(`:warning: **Warning: ${shardLabel} took ${durationMins} minutes, exceeding the ${thresholdMins} minute threshold.**`);

0 commit comments

Comments
 (0)