From b80007bbd5f9251d499f35d9d1e9a83265b0194c Mon Sep 17 00:00:00 2001 From: TC Date: Sun, 3 May 2020 11:44:00 +0200 Subject: [PATCH] Tests: only stop if running (in case of error when launching app) --- tests/environment.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/environment.js b/tests/environment.js index 2a80b3df..48e5807b 100644 --- a/tests/environment.js +++ b/tests/environment.js @@ -33,7 +33,9 @@ class TestEnvironment extends NodeEnvironment { } async teardown() { - await this.global.__APP__.stop(); + if (this.global.__APP__.isRunning()) { + await this.global.__APP__.stop(); + } await super.teardown(); }