Skip to content

Commit 757c438

Browse files
committed
WIP: force exit in CI smoke tests if required
1 parent cfdebd4 commit 757c438

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/smoke.spec.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ test('app launches and loads UI from server', async () => {
2323
await expect(window.locator('h1:has-text("Intercept HTTP")')).toBeVisible({ timeout: 60000 });
2424
console.log('saw title');
2525

26-
await electronApp.close();
26+
if (process.env.CI) {
27+
await Promise.race([
28+
electronApp.close(),
29+
new Promise((_, reject) => setTimeout(() => reject(new Error('App failed to close within 5 seconds')), 5000))
30+
]);
31+
} else {
32+
await electronApp.close();
33+
}
2734
console.log('closed app');
2835
});

0 commit comments

Comments
 (0)