Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
test: add more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSim committed Sep 7, 2024
1 parent c490ca6 commit edeee57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/tests/e2e/util/setup-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ module.exports = () => {
console.info( `[electron stdout] ${data}` );
// Check for a specific output to confirm readiness
if ( data.toString().includes( 'loaded userSettings' ) ) {
console.info( '[beforeAll] Electron app runs correctly' );
isReady = true;
electronProcess.kill();
resolve();
}
} );
Expand All @@ -87,14 +89,13 @@ module.exports = () => {
}
} );

// Optionally set a timeout if you want to kill the process after a certain period
setTimeout( () => {
if ( ! isReady ) {
electronProcess.kill();
console.info( '[beforeAll] Electron process killed due to timeout.' );
reject( new Error( 'Electron process did not become ready in time' ) );
}
}, 30000 ); // Adjust timeout if needed
}, 30000 );
} );
} );

Expand Down

0 comments on commit edeee57

Please sign in to comment.