1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fixing tests harder

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-11-24 15:03:49 +03:00
parent 88d2e66678
commit d8ff1eecb1

View File

@ -74,21 +74,20 @@ export async function start() {
timeout: 100_000, timeout: 100_000,
}); });
const cleanup = async () => {
await app.close();
await remove(CICD).catch(noop);
};
try { try {
const window = await getMainWindow(app); const window = await getMainWindow(app);
return { return {
app, app,
window, window,
cleanup, cleanup: async () => {
await app.close();
await remove(CICD).catch(noop);
},
}; };
} catch (error) { } catch (error) {
await cleanup(); await app.close();
await remove(CICD).catch(noop);
throw error; throw error;
} }
} }