File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ test('app launches and loads UI from server', async () => {
55 const electronApp = await electron . launch ( {
66 cwd : path . join ( import . meta. dirname , '..' ) ,
77 args : [ '.' ] ,
8- timeout : 60000
8+ timeout : 60000 ,
9+ ...( process . env . CI && { env : { ...process . env , ELECTRON_ENABLE_LOGGING : '1' } } )
910 } ) ;
1011
1112 electronApp . process ( ) . stdout ?. on ( 'data' , ( data ) => {
@@ -23,18 +24,6 @@ test('app launches and loads UI from server', async () => {
2324 await expect ( window . locator ( 'h1:has-text("Intercept HTTP")' ) ) . toBeVisible ( { timeout : 60000 } ) ;
2425 console . log ( 'saw title' ) ;
2526
26- await Promise . race ( [
27- electronApp . close ( ) ,
28- new Promise ( ( _ , reject ) => setTimeout ( ( ) => reject ( new Error ( 'App failed to close cleanly' ) ) , 5000 ) )
29- ] ) . catch ( async ( error ) => {
30- console . warn ( 'Warning:' , error . message , '- force killing process' ) ;
31- electronApp . process ( ) . kill ( 'SIGKILL' ) ;
32- if ( ! process . env . CI ) {
33- console . log ( '(Note that shutdown issues like this are ignored in CI)' ) ;
34- throw error ;
35- } else {
36- console . log ( 'Ignoring error (assuming this is a CI issue)' )
37- }
38- } ) ;
27+ await electronApp . close ( ) ;
3928 console . log ( 'closed app' ) ;
4029} ) ;
You can’t perform that action at this time.
0 commit comments