File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -174,8 +174,8 @@ export abstract class BaseReporter implements Reporter {
174174 if ( ! this . shouldLog ( log ) )
175175 return
176176 const task = log . taskId ? this . ctx . state . idMap . get ( log . taskId ) : undefined
177- this . ctx . logger . log ( c . gray ( log . type + c . dim ( ` | ${ task ? getFullName ( task , c . dim ( ' > ' ) ) : 'unknown test' } ` ) ) )
178- process [ log . type ] . write ( `${ log . content } \n` )
177+ const header = c . gray ( log . type + c . dim ( ` | ${ task ? getFullName ( task , c . dim ( ' > ' ) ) : 'unknown test' } ` ) )
178+ process [ log . type ] . write ( `${ header } \n ${ log . content } \n` )
179179 }
180180
181181 shouldLog ( log : UserConsoleLog ) {
Original file line number Diff line number Diff line change @@ -76,12 +76,10 @@ export async function setupConsoleLogSpy() {
7676 if ( ! buffer )
7777 return
7878 const content = buffer . map ( i => String ( i ) ) . join ( '' )
79- if ( ! content . trim ( ) )
80- return
8179 const timer = timers . get ( taskId ) !
8280 rpc ( ) . onUserConsoleLog ( {
8381 type : 'stdout' ,
84- content,
82+ content : content || '<empty line>' ,
8583 taskId,
8684 time : timer . stdoutTime || RealDate . now ( ) ,
8785 size : buffer . length ,
@@ -94,12 +92,10 @@ export async function setupConsoleLogSpy() {
9492 if ( ! buffer )
9593 return
9694 const content = buffer . map ( i => String ( i ) ) . join ( '' )
97- if ( ! content . trim ( ) )
98- return
9995 const timer = timers . get ( taskId ) !
10096 rpc ( ) . onUserConsoleLog ( {
10197 type : 'stderr' ,
102- content,
98+ content : content || '<empty line>' ,
10399 taskId,
104100 time : timer . stderrTime || RealDate . now ( ) ,
105101 size : buffer . length ,
You can’t perform that action at this time.
0 commit comments