@@ -63,6 +63,9 @@ function renderDefaultTestResult(result: ReplaySuiteTestResult): void {
6363 process . stdout . write (
6464 `PASS ${ replayTestDisplayName ( result ) } ${ formatReplayTestDurationSuffix ( result ) } \n` ,
6565 ) ;
66+ for ( const line of replayTestWarningLines ( result ) ) {
67+ process . stdout . write ( ` ${ line } \n` ) ;
68+ }
6669}
6770
6871function renderVerboseTestResult ( result : ReplaySuiteTestResult ) : void {
@@ -78,6 +81,9 @@ function renderVerboseTestResult(result: ReplaySuiteTestResult): void {
7881 if ( result . status === 'skipped' ) {
7982 process . stdout . write ( ` ${ result . message ?? 'skipped' } \n` ) ;
8083 }
84+ for ( const line of replayTestWarningLines ( result ) ) {
85+ process . stdout . write ( ` ${ line } \n` ) ;
86+ }
8187 for ( const line of replayTestStepLines ( result ) ) {
8288 process . stdout . write ( ` ${ line } \n` ) ;
8389 }
@@ -447,6 +453,9 @@ function appendReplaySystemOutMetadata(lines: string[], test: ReplaySuiteTestRes
447453 appendOptionalLine ( lines , 'session' in test ? `session: ${ test . session } ` : undefined ) ;
448454 appendOptionalLine ( lines , 'replayed' in test ? `replayed: ${ test . replayed } ` : undefined ) ;
449455 appendOptionalLine ( lines , 'healed' in test ? `healed: ${ test . healed } ` : undefined ) ;
456+ for ( const warning of replayTestWarningLines ( test ) ) {
457+ lines . push ( warning ) ;
458+ }
450459 appendOptionalLine (
451460 lines ,
452461 'artifactsDir' in test && test . artifactsDir ? `artifactsDir: ${ test . artifactsDir } ` : undefined ,
@@ -513,6 +522,11 @@ function appendOptionalLine(lines: string[], line: string | undefined): void {
513522 if ( line ) lines . push ( line ) ;
514523}
515524
525+ function replayTestWarningLines ( result : ReplaySuiteTestResult ) : string [ ] {
526+ if ( result . status !== 'passed' ) return [ ] ;
527+ return ( result . warnings ?? [ ] ) . map ( ( warning ) => `warning: ${ warning } ` ) ;
528+ }
529+
516530function formatJUnitSeconds ( durationMs : number ) : string {
517531 return ( Math . max ( 0 , durationMs ) / 1000 ) . toFixed ( 3 ) ;
518532}
0 commit comments