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() {
83
83
try {
84
84
await driver . get ( `http://localhost:${ PORT } /index.html?worstCaseCount=2&iterationCount=3` ) ;
85
85
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 ( ) ) ;
87
89
// We might not get a chance to install the on-ready listener, thus
88
90
// we also check if the runner is ready synchronously.
89
91
if ( globalThis ?. JetStream ?. isReady )
90
92
callback ( )
91
93
} ) ;
92
- await driver . manage ( ) . setTimeouts ( { script : 60_000 } ) ;
94
+ await driver . manage ( ) . setTimeouts ( { script : 3 * 60_000 } ) ;
93
95
results = await driver . executeAsyncScript ( ( callback ) => {
94
96
globalThis . addEventListener ( "JetStreamDone" , event => callback ( event . detail ) ) ;
95
97
JetStream . start ( ) ;
96
98
} ) ;
97
- } finally {
98
- console . log ( "\nTests complete!" ) ;
99
+ console . log ( "\n✅ Tests completed!" ) ;
100
+ console . log ( "RESULTS:" )
99
101
console . log ( results )
102
+ } catch ( e ) {
103
+ console . error ( "\n❌ Tests failed!" ) ;
104
+ console . error ( e ) ;
105
+ throw e ;
106
+ } finally {
100
107
driver . quit ( ) ;
101
108
server . close ( ) ;
102
109
}
You can’t perform that action at this time.
0 commit comments