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', () => {
864
864
}
865
865
866
866
const [ Posts , resolvePostsData ] = makeDelayedText ( ) ;
867
+ const [ Photos , resolvePhotosData ] = makeDelayedText ( ) ;
867
868
const suspendedChunk = createSuspendedChunk ( < p > loading</ p > ) ;
868
869
const { writable, readable} = getTestStream ( ) ;
869
870
const { pipe} = ReactServerDOMServer . renderToPipeableStream (
@@ -893,8 +894,9 @@ describe('ReactFlightDOM', () => {
893
894
const donePromise = createResolvablePromise ( ) ;
894
895
895
896
const value = (
896
- < Suspense fallback = { < p > loading posts</ p > } >
897
+ < Suspense fallback = { < p > loading posts and photos </ p > } >
897
898
< Posts />
899
+ < Photos />
898
900
</ Suspense >
899
901
) ;
900
902
@@ -903,13 +905,14 @@ describe('ReactFlightDOM', () => {
903
905
donePromise . resolve ( { value, done : true } ) ;
904
906
} ) ;
905
907
906
- expect ( container . innerHTML ) . toBe ( '<p>loading posts</p>' ) ;
908
+ expect ( container . innerHTML ) . toBe ( '<p>loading posts and photos </p>' ) ;
907
909
908
910
await act ( async ( ) => {
909
911
await resolvePostsData ( 'posts' ) ;
912
+ await resolvePhotosData ( 'photos' ) ;
910
913
} ) ;
911
914
912
- expect ( container . innerHTML ) . toBe ( '<div>posts</div>' ) ;
915
+ expect ( container . innerHTML ) . toBe ( '<div>posts</div><div>photos</div> ' ) ;
913
916
expect ( reportedErrors ) . toEqual ( [ ] ) ;
914
917
} ) ;
915
918
You can’t perform that action at this time.
0 commit comments