File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Plugins/PackageToJS/Templates Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ Hint: This typically means that a continuation leak occurred.
116116 for ( const [ name , fn ] of Object . entries ( functions ) ) {
117117 // Bind the page context to each function if needed
118118 // The function can optionally use the page from its closure
119- page . exposeFunction ( name , fn ) ;
119+ await page . exposeFunction ( name , fn ) ;
120120 }
121121 } ;
122122 }
Original file line number Diff line number Diff line change @@ -108,10 +108,12 @@ Please run the following command to install it:
108108 page . on ( "console" , ( message ) => {
109109 console . log ( message . text ( ) ) ;
110110 } ) ;
111-
111+
112+ let resolveExit = undefined ;
112113 const onExit = new Promise ( ( resolve ) => {
113- page . exposeFunction ( "exitTest" , resolve ) ;
114+ resolveExit = resolve ;
114115 } ) ;
116+ await page . exposeFunction ( "exitTest" , resolveExit ) ;
115117 await page . goto ( `http://localhost:${ address . port } /test.browser.html` ) ;
116118 const exitCode = await onExit ;
117119 await browser . close ( ) ;
You can’t perform that action at this time.
0 commit comments