Fixing tests harder

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2021-11-24 15:03:49 +03:00
1 parent 88d2e66678
commit d8ff1eecb1
1 file changed
+6 -7
+6 -7
View File
@@ -74,21 +74,20 @@ export async function start() {
timeout: 100_000,
});
const cleanup = async () => {
await app.close();
await remove(CICD).catch(noop);
};
try {
const window = await getMainWindow(app);
return {
app,
window,
cleanup,
cleanup: async () => {
await app.close();
await remove(CICD).catch(noop);
},
};
} catch (error) {
await cleanup();
await app.close();
await remove(CICD).catch(noop);
throw error;
}
}