mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
lint: fix
This commit is contained in:
parent
91f28fdf07
commit
ccf825af06
1 changed files with 11 additions and 3 deletions
|
|
@ -40,7 +40,11 @@ After(async function(this: ApplicationWorld, { pickle }) {
|
|||
// Add timeout protection for window.close() to prevent hanging
|
||||
await Promise.race([
|
||||
window.close(),
|
||||
new Promise((_, reject) => setTimeout(() => reject(new Error('Window close timeout')), 5000)),
|
||||
new Promise((_, reject) =>
|
||||
setTimeout(() => {
|
||||
reject(new Error('Window close timeout'));
|
||||
}, 5000)
|
||||
),
|
||||
]);
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
@ -48,11 +52,15 @@ After(async function(this: ApplicationWorld, { pickle }) {
|
|||
}
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
// Add timeout protection for app.close() to prevent hanging
|
||||
await Promise.race([
|
||||
this.app.close(),
|
||||
new Promise((_, reject) => setTimeout(() => reject(new Error('App close timeout')), 10000)),
|
||||
new Promise((_, reject) =>
|
||||
setTimeout(() => {
|
||||
reject(new Error('App close timeout'));
|
||||
}, 10000)
|
||||
),
|
||||
]);
|
||||
} catch (error) {
|
||||
console.error('Error during cleanup:', error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue