@@ -37,7 +37,6 @@ const BADGE_PADDING = ' '
3737
3838export interface BaseOptions {
3939 isTTY ?: boolean
40- isAgent ?: boolean
4140}
4241
4342export abstract class BaseReporter implements Reporter {
@@ -50,14 +49,12 @@ export abstract class BaseReporter implements Reporter {
5049 renderSucceed = false
5150
5251 protected verbose = false
53- protected isAgent = false
5452
5553 private _filesInWatchMode = new Map < string , number > ( )
5654 private _timeStart = formatTimeString ( new Date ( ) )
5755
5856 constructor ( options : BaseOptions = { } ) {
5957 this . isTTY = options . isTTY ?? isTTY
60- this . isAgent = options . isAgent ?? false
6158 }
6259
6360 onInit ( ctx : Vitest ) : void {
@@ -120,8 +117,8 @@ export abstract class BaseReporter implements Reporter {
120117 this . printTestModule ( testModule )
121118 }
122119
123- private logFailedTask ( task : Task ) {
124- if ( this . ctx . config . silent === 'passed-only' || this . isAgent ) {
120+ protected logFailedTask ( task : Task ) : void {
121+ if ( this . ctx . config . silent === 'passed-only' ) {
125122 for ( const log of task . logs || [ ] ) {
126123 this . onUserConsoleLog ( log , 'failed' )
127124 }
@@ -134,10 +131,6 @@ export abstract class BaseReporter implements Reporter {
134131 return
135132 }
136133
137- if ( this . isAgent && moduleState !== 'failed' ) {
138- return
139- }
140-
141134 let testsCount = 0
142135 let failedCount = 0
143136 let skippedCount = 0
@@ -207,10 +200,6 @@ export abstract class BaseReporter implements Reporter {
207200 this . log ( c . red ( ` ${ padding } ${ taskFail } ${ this . getTestName ( test . task , separator ) } ` ) + suffix )
208201 }
209202
210- else if ( this . isAgent ) {
211- // In agent mode, only print failed tests
212- }
213-
214203 // also print slow tests
215204 else if ( duration > this . ctx . config . slowTestThreshold ) {
216205 this . log ( ` ${ padding } ${ c . yellow ( c . dim ( F_CHECK ) ) } ${ this . getTestName ( test . task , separator ) } ${ suffix } ` )
@@ -511,10 +500,6 @@ export abstract class BaseReporter implements Reporter {
511500 return false
512501 }
513502
514- if ( this . isAgent && taskState !== 'failed' ) {
515- return false
516- }
517-
518503 if ( this . ctx . config . onConsoleLog ) {
519504 const task = log . taskId ? this . ctx . state . idMap . get ( log . taskId ) : undefined
520505 const entity = task && this . ctx . state . getReportedEntity ( task )
0 commit comments