From d8ff1eecb16067141399f7c91087bbb1667eff87 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Wed, 24 Nov 2021 15:03:49 +0300 Subject: [PATCH] Fixing tests harder Signed-off-by: Alex Andreev --- integration/helpers/utils.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/integration/helpers/utils.ts b/integration/helpers/utils.ts index 783111d0fd..5d121b5d43 100644 --- a/integration/helpers/utils.ts +++ b/integration/helpers/utils.ts @@ -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; } }