File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ const getHarnessInternal = async (
3939 throw new DOMException ( 'The operation was aborted' , 'AbortError' ) ;
4040 }
4141
42- const restart = ( ) =>
42+ const initialRestart = ( ) =>
4343 new Promise < void > ( ( resolve , reject ) => {
4444 signal . addEventListener ( 'abort' , ( ) => {
4545 reject ( new DOMException ( 'The operation was aborted' , 'AbortError' ) ) ;
@@ -51,12 +51,18 @@ const getHarnessInternal = async (
5151
5252 // Wait for the bridge to be ready
5353 try {
54- await restart ( ) ;
54+ await initialRestart ( ) ;
5555 } catch ( error ) {
5656 await dispose ( ) ;
5757 throw error ;
5858 }
5959
60+ const restart = ( ) =>
61+ new Promise < void > ( ( resolve , reject ) => {
62+ serverBridge . once ( 'ready' , ( ) => resolve ( ) ) ;
63+ platformInstance . restartApp ( ) . catch ( reject ) ;
64+ } ) ;
65+
6066 return {
6167 runTests : async ( path , options ) => {
6268 const client = serverBridge . rpc . clients . at ( - 1 ) ;
You can’t perform that action at this time.
0 commit comments