@@ -183,16 +183,18 @@ describe('watch mode', { concurrency: false, timeout: 60_0000 }, () => {
183
183
isReady : ( data ) => data . startsWith ( 'running' ) ,
184
184
} ) ;
185
185
186
+ assert . strictEqual ( stderr , '' ) ;
187
+ const expected = [ 'running' , `Restarting ${ inspect ( file ) } ` , 'Waiting for graceful termination...' ,
188
+ 'exiting gracefully' , `Gracefully restarted ${ inspect ( file ) } ` , 'running' ] . join ( '\n' ) ;
189
+
186
190
// This message appearing is very flaky depending on a race between the
187
191
// inner process and the outer process. it is acceptable for the message not to appear
188
192
// as long as the SIGTERM handler is respected.
189
193
if ( stdout . includes ( 'Waiting for graceful termination...' ) ) {
190
- assert . strictEqual ( stdout , [ 'running' , `Restarting ${ inspect ( file ) } ` , 'Waiting for graceful termination...' ,
191
- 'exiting gracefully' , `Gracefully restarted ${ inspect ( file ) } ` , 'running' , 'exiting gracefully' , '' ] . join ( '\n' ) ) ;
194
+ assert ( stdout . startsWith ( expected ) ) ;
192
195
} else {
193
- assert . strictEqual ( stdout , [ 'running' , `Restarting ${ inspect ( file ) } ` , 'exiting gracefully' , 'running' , '' ] . join ( '\n' ) ) ;
196
+ assert ( stdout . startsWith ( removeGraceMessage ( expected ) ) ) ;
194
197
}
195
- assert . strictEqual ( stderr , '' ) ;
196
198
} ) ;
197
199
198
200
it ( 'should pass arguments to file' , async ( ) => {
0 commit comments