@@ -114,11 +114,19 @@ export abstract class BaseReporter implements Reporter {
114
114
const anyFailed = tests . some ( test => test . result ?. state === 'fail' )
115
115
116
116
for ( const test of tests ) {
117
- const duration = test . result ?. duration
117
+ const { duration, retryCount, repeatCount } = test . result || { }
118
+ let suffix = ''
119
+
120
+ if ( retryCount != null && retryCount > 0 ) {
121
+ suffix += c . yellow ( ` (retry x${ retryCount } )` )
122
+ }
123
+
124
+ if ( repeatCount != null && repeatCount > 0 ) {
125
+ suffix += c . yellow ( ` (repeat x${ repeatCount } )` )
126
+ }
118
127
119
128
if ( test . result ?. state === 'fail' ) {
120
- const suffix = this . getDurationPrefix ( test )
121
- this . log ( c . red ( ` ${ taskFail } ${ getTestName ( test , c . dim ( ' > ' ) ) } ${ suffix } ` ) )
129
+ this . log ( c . red ( ` ${ taskFail } ${ getTestName ( test , c . dim ( ' > ' ) ) } ${ this . getDurationPrefix ( test ) } ` ) + suffix )
122
130
123
131
test . result ?. errors ?. forEach ( ( e ) => {
124
132
// print short errors, full errors will be at the end in summary
@@ -130,7 +138,7 @@ export abstract class BaseReporter implements Reporter {
130
138
else if ( duration && duration > this . ctx . config . slowTestThreshold ) {
131
139
this . log (
132
140
` ${ c . yellow ( c . dim ( F_CHECK ) ) } ${ getTestName ( test , c . dim ( ' > ' ) ) } `
133
- + ` ${ c . yellow ( Math . round ( duration ) + c . dim ( 'ms' ) ) } ` ,
141
+ + ` ${ c . yellow ( Math . round ( duration ) + c . dim ( 'ms' ) ) } ${ suffix } ` ,
134
142
)
135
143
}
136
144
@@ -144,7 +152,7 @@ export abstract class BaseReporter implements Reporter {
144
152
}
145
153
146
154
else if ( this . renderSucceed || anyFailed ) {
147
- this . log ( ` ${ c . dim ( getStateSymbol ( test ) ) } ${ getTestName ( test , c . dim ( ' > ' ) ) } ` )
155
+ this . log ( ` ${ c . dim ( getStateSymbol ( test ) ) } ${ getTestName ( test , c . dim ( ' > ' ) ) } ${ suffix } ` )
148
156
}
149
157
}
150
158
}
0 commit comments