@@ -936,7 +936,9 @@ describe('ReactDOMFizzServer', () => {
936936 return (
937937 < div >
938938 < Suspense fallback = { < span > loading...</ span > } >
939- < Erroring isClient = { isClient } />
939+ < Indirection level = { 2 } >
940+ < Erroring isClient = { isClient } />
941+ </ Indirection >
940942 </ Suspense >
941943 </ div >
942944 ) ;
@@ -979,7 +981,15 @@ describe('ReactDOMFizzServer', () => {
979981 [
980982 theError . message ,
981983 expectedDigest ,
982- componentStack ( [ 'Erroring' , 'Suspense' , 'div' , 'App' ] ) ,
984+ componentStack ( [
985+ 'Erroring' ,
986+ 'Indirection' ,
987+ 'Indirection' ,
988+ 'Indirection' ,
989+ 'Suspense' ,
990+ 'div' ,
991+ 'App' ,
992+ ] ) ,
983993 ] ,
984994 ] ,
985995 [
@@ -1330,6 +1340,11 @@ describe('ReactDOMFizzServer', () => {
13301340 < AsyncText text = "Hello" />
13311341 </ h1 >
13321342 </ Suspense >
1343+ < main >
1344+ < Suspense fallback = "loading..." >
1345+ < AsyncText text = "World" />
1346+ </ Suspense >
1347+ </ main >
13331348 </ div >
13341349 ) ;
13351350 }
@@ -1359,7 +1374,11 @@ describe('ReactDOMFizzServer', () => {
13591374 await waitForAll ( [ ] ) ;
13601375
13611376 // We're still loading because we're waiting for the server to stream more content.
1362- expect ( getVisibleChildren ( container ) ) . toEqual ( < div > Loading...</ div > ) ;
1377+ expect ( getVisibleChildren ( container ) ) . toEqual (
1378+ < div >
1379+ Loading...< main > loading...</ main >
1380+ </ div > ,
1381+ ) ;
13631382
13641383 // We abort the server response.
13651384 await act ( ( ) => {
@@ -1374,26 +1393,43 @@ describe('ReactDOMFizzServer', () => {
13741393 [
13751394 'The server did not finish this Suspense boundary: The render was aborted by the server without a reason.' ,
13761395 expectedDigest ,
1377- componentStack ( [ 'h1' , 'Suspense' , 'div' , 'App' ] ) ,
1396+ componentStack ( [ 'Suspense' , 'div' , 'App' ] ) ,
1397+ ] ,
1398+ [
1399+ 'The server did not finish this Suspense boundary: The render was aborted by the server without a reason.' ,
1400+ expectedDigest ,
1401+ componentStack ( [ 'Suspense' , 'main' , 'div' , 'App' ] ) ,
13781402 ] ,
13791403 ] ,
13801404 [
13811405 [
13821406 'The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.' ,
13831407 expectedDigest ,
13841408 ] ,
1409+ [
1410+ 'The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.' ,
1411+ expectedDigest ,
1412+ ] ,
13851413 ] ,
13861414 ) ;
1387- expect ( getVisibleChildren ( container ) ) . toEqual ( < div > Loading...</ div > ) ;
1415+ expect ( getVisibleChildren ( container ) ) . toEqual (
1416+ < div >
1417+ Loading...< main > loading...</ main >
1418+ </ div > ,
1419+ ) ;
13881420
13891421 // We now resolve it on the client.
1390- await clientAct ( ( ) => resolveText ( 'Hello' ) ) ;
1422+ await clientAct ( ( ) => {
1423+ resolveText ( 'Hello' ) ;
1424+ resolveText ( 'World' ) ;
1425+ } ) ;
13911426 assertLog ( [ ] ) ;
13921427
13931428 // The client rendered HTML is now in place.
13941429 expect ( getVisibleChildren ( container ) ) . toEqual (
13951430 < div >
13961431 < h1 > Hello</ h1 >
1432+ < main > World</ main >
13971433 </ div > ,
13981434 ) ;
13991435 } ) ;
0 commit comments