File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/react-server-dom-webpack/src/__tests__ Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -864,6 +864,7 @@ describe('ReactFlightDOM', () => {
864864 }
865865
866866 const [ Posts , resolvePostsData ] = makeDelayedText ( ) ;
867+ const [ Photos , resolvePhotosData ] = makeDelayedText ( ) ;
867868 const suspendedChunk = createSuspendedChunk ( < p > loading</ p > ) ;
868869 const { writable, readable} = getTestStream ( ) ;
869870 const { pipe} = ReactServerDOMServer . renderToPipeableStream (
@@ -893,8 +894,9 @@ describe('ReactFlightDOM', () => {
893894 const donePromise = createResolvablePromise ( ) ;
894895
895896 const value = (
896- < Suspense fallback = { < p > loading posts</ p > } >
897+ < Suspense fallback = { < p > loading posts and photos </ p > } >
897898 < Posts />
899+ < Photos />
898900 </ Suspense >
899901 ) ;
900902
@@ -903,13 +905,14 @@ describe('ReactFlightDOM', () => {
903905 donePromise . resolve ( { value, done : true } ) ;
904906 } ) ;
905907
906- expect ( container . innerHTML ) . toBe ( '<p>loading posts</p>' ) ;
908+ expect ( container . innerHTML ) . toBe ( '<p>loading posts and photos </p>' ) ;
907909
908910 await act ( async ( ) => {
909911 await resolvePostsData ( 'posts' ) ;
912+ await resolvePhotosData ( 'photos' ) ;
910913 } ) ;
911914
912- expect ( container . innerHTML ) . toBe ( '<div>posts</div>' ) ;
915+ expect ( container . innerHTML ) . toBe ( '<div>posts</div><div>photos</div> ' ) ;
913916 expect ( reportedErrors ) . toEqual ( [ ] ) ;
914917 } ) ;
915918
You can’t perform that action at this time.
0 commit comments