@@ -99,6 +99,8 @@ describe('Dev', () => {
9999 )
100100
101101 await frontendPromise
102+ // Wait for React 19 to render the process output
103+ await waitForContent ( renderInstance , 'third frontend message' )
102104
103105 // Then
104106 expect ( unstyled ( renderInstance . lastFrame ( ) ! . replace ( / \d / g, '0' ) ) ) . toMatchInlineSnapshot ( `
@@ -181,6 +183,8 @@ describe('Dev', () => {
181183 )
182184
183185 await frontendPromise
186+ // Wait for React 19 to render the process output
187+ await waitForContent ( renderInstance , 'third frontend message' )
184188
185189 // Then
186190 expect ( unstyled ( renderInstance . lastFrame ( ) ! . replace ( / \d / g, '0' ) ) ) . toMatchInlineSnapshot ( `
@@ -319,23 +323,10 @@ describe('Dev', () => {
319323
320324 const promise = renderInstance . waitUntilExit ( )
321325
322- abortController . abort ( )
323-
324- expect ( unstyled ( renderInstance . lastFrame ( ) ! ) . replace ( / \d / g, '0' ) ) . toMatchInlineSnapshot ( `
325- "00:00:00 │ backend │ first backend message
326- 00:00:00 │ backend │ second backend message
327- 00:00:00 │ backend │ third backend message
328-
329- ────────────────────────────────────────────────────────────────────────────────────────────────────
326+ // Wait for process output to render before aborting
327+ await waitForContent ( renderInstance , 'first backend message' )
330328
331- › Press d │ toggle development store preview: ✔ on
332- › Press g │ open GraphiQL (Admin API) in your browser
333- › Press p │ preview in your browser
334- › Press q │ quit
335-
336- Shutting down dev ...
337- "
338- ` )
329+ abortController . abort ( )
339330
340331 await promise
341332
@@ -384,23 +375,10 @@ describe('Dev', () => {
384375
385376 const promise = renderInstance . waitUntilExit ( )
386377
387- abortController . abort ( 'something went wrong' )
388-
389- expect ( unstyled ( renderInstance . lastFrame ( ) ! ) . replace ( / \d / g, '0' ) ) . toMatchInlineSnapshot ( `
390- "00:00:00 │ backend │ first backend message
391- 00:00:00 │ backend │ second backend message
392- 00:00:00 │ backend │ third backend message
393-
394- ────────────────────────────────────────────────────────────────────────────────────────────────────
378+ // Wait for process output to render before aborting
379+ await waitForContent ( renderInstance , 'first backend message' )
395380
396- › Press d │ toggle development store preview: ✔ on
397- › Press g │ open GraphiQL (Admin API) in your browser
398- › Press p │ preview in your browser
399- › Press q │ quit
400-
401- Shutting down dev because of an error ...
402- "
403- ` )
381+ abortController . abort ( 'something went wrong' )
404382
405383 await promise
406384
@@ -441,7 +419,7 @@ describe('Dev', () => {
441419 /> ,
442420 )
443421
444- await waitForContent ( renderInstance , 'Preview URL ' )
422+ await waitForContent ( renderInstance , 'first backend message ' )
445423
446424 expect ( unstyled ( renderInstance . lastFrame ( ) ! ) . replace ( / \d / g, '0' ) ) . toMatchInlineSnapshot ( `
447425 "00:00:00 │ backend │ first backend message
0 commit comments