File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
examples/expo-app/__tests__ Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,22 @@ describe('Index', () => {
1515 // Wait for the subscription status to be updated
1616 await waitFor (
1717 ( ) => {
18- expect ( getByTestId ( 'realtime_status' ) ) . toHaveTextContent ( 'SUBSCRIBED' )
18+ const status = getByTestId ( 'realtime_status' ) . props . children
19+ expect ( status ) . toBe ( 'SUBSCRIBED' )
1920 } ,
2021 {
21- timeout : 10000 ,
22+ timeout : 30000 , // 30 seconds timeout for waitFor
23+ interval : 1000 , // Check every second
24+ onTimeout : ( error ) => {
25+ const currentStatus = getByTestId ( 'realtime_status' ) . props . children
26+ throw new Error (
27+ `Timeout waiting for SUBSCRIBED status. Current status: ${ currentStatus } . ${ error . message } `
28+ )
29+ } ,
2230 }
2331 )
2432
2533 // Unmount the component to trigger cleanup.
2634 unmount ( )
27- } , 10000 )
35+ } , 35000 ) // 35 seconds timeout for the entire test
2836} )
You can’t perform that action at this time.
0 commit comments