@@ -66,14 +66,17 @@ function renderDuration(durationMs) {
6666export default class BaseReporter implements Reporter {
6767 stream : SonicBoom ;
6868 fd : number ;
69+ dryRun : boolean ;
6970 metrics = {
7071 succeeded : 0 ,
7172 failed : 0 ,
7273 skipped : 0 ,
74+ registered : 0 ,
7375 } ;
7476
7577 constructor ( options : ReporterOptions = { } ) {
7678 this . fd = options . fd || process . stdout . fd ;
79+ this . dryRun = options . dryRun ?? false ;
7780 /**
7881 * minLength is set to 1 byte to make sure we flush the
7982 * content even if its the last byte on the stream buffer
@@ -82,6 +85,11 @@ export default class BaseReporter implements Reporter {
8285 this . stream = new SonicBoom ( { fd : this . fd , sync : true , minLength : 1 } ) ;
8386 }
8487
88+ onJourneyRegister ( journey : Journey ) : void {
89+ this . write ( `\nJourney: ${ journey . name } ` ) ;
90+ this . metrics . registered ++ ;
91+ }
92+
8593 onJourneyStart ( journey : Journey , { } : JourneyStartResult ) {
8694 this . write ( `\nJourney: ${ journey . name } ` ) ;
8795 }
@@ -110,9 +118,14 @@ export default class BaseReporter implements Reporter {
110118 }
111119
112120 onEnd ( ) {
113- const { failed, succeeded, skipped } = this . metrics ;
121+ const { failed, succeeded, skipped, registered } = this . metrics ;
114122 const total = failed + succeeded + skipped ;
115123
124+ if ( this . dryRun ) {
125+ this . write ( `\n${ registered } journey(s) registered` ) ;
126+ return ;
127+ }
128+
116129 let message = '\n' ;
117130 if ( total === 0 ) {
118131 message = 'No tests found!' ;
0 commit comments