@@ -114,11 +114,19 @@ export abstract class BaseReporter implements Reporter {
114114 const anyFailed = tests . some ( test => test . result ?. state === 'fail' )
115115
116116 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+ }
118127
119128 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 )
122130
123131 test . result ?. errors ?. forEach ( ( e ) => {
124132 // print short errors, full errors will be at the end in summary
@@ -130,7 +138,7 @@ export abstract class BaseReporter implements Reporter {
130138 else if ( duration && duration > this . ctx . config . slowTestThreshold ) {
131139 this . log (
132140 ` ${ 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 } ` ,
134142 )
135143 }
136144
@@ -144,7 +152,7 @@ export abstract class BaseReporter implements Reporter {
144152 }
145153
146154 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 } ` )
148156 }
149157 }
150158 }
0 commit comments