File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -83,20 +83,27 @@ async function testEnd2End() {
8383 try {
8484 await driver . get ( `http://localhost:${ PORT } /index.html?worstCaseCount=2&iterationCount=3` ) ;
8585 await driver . executeAsyncScript ( ( callback ) => {
86- globalThis . addEventListener ( "JetStreamReady" , callback ) ;
86+ // callback() is explicitly called without the default event
87+ // as argument to avoid serialization issues with chromedriver.
88+ globalThis . addEventListener ( "JetStreamReady" , ( ) => callback ( ) ) ;
8789 // We might not get a chance to install the on-ready listener, thus
8890 // we also check if the runner is ready synchronously.
8991 if ( globalThis ?. JetStream ?. isReady )
9092 callback ( )
9193 } ) ;
92- await driver . manage ( ) . setTimeouts ( { script : 60_000 } ) ;
94+ await driver . manage ( ) . setTimeouts ( { script : 3 * 60_000 } ) ;
9395 results = await driver . executeAsyncScript ( ( callback ) => {
9496 globalThis . addEventListener ( "JetStreamDone" , event => callback ( event . detail ) ) ;
9597 JetStream . start ( ) ;
9698 } ) ;
97- } finally {
98- console . log ( "\nTests complete!" ) ;
99+ console . log ( "\n✅ Tests completed!" ) ;
100+ console . log ( "RESULTS:" )
99101 console . log ( results )
102+ } catch ( e ) {
103+ console . error ( "\n❌ Tests failed!" ) ;
104+ console . error ( e ) ;
105+ throw e ;
106+ } finally {
100107 driver . quit ( ) ;
101108 server . close ( ) ;
102109 }
You can’t perform that action at this time.
0 commit comments