From b67a9f5a45142bc73d557644aebf47e6441fc912 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Fri, 17 Dec 2021 15:05:57 +0100 Subject: [PATCH] wip: replace isRunning by evt handler --- test/e2e/launch.e2e.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/e2e/launch.e2e.js b/test/e2e/launch.e2e.js index 49c6f03fd..a7af0b3a2 100644 --- a/test/e2e/launch.e2e.js +++ b/test/e2e/launch.e2e.js @@ -19,9 +19,10 @@ async function getPort () { describe('Application launch', function () { this.timeout(60000) let app = null + let closed = false afterEach(async function () { - if (app) { + if (app && !closed) { await app.close() } }) @@ -41,6 +42,10 @@ describe('Application launch', function () { } }) + app.on('close', () => { + closed = true + }) + return { app, repoPath, home } }