From 7ecd12985e176ce9be7be26c7045c4a5b0bd5c4d Mon Sep 17 00:00:00 2001 From: Exidex <16986685+Exidex@users.noreply.github.com> Date: Thu, 30 May 2024 22:03:30 +0200 Subject: [PATCH] Kill mock backend if frontend failed --- js/scenario_runner_cli/src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/scenario_runner_cli/src/main.ts b/js/scenario_runner_cli/src/main.ts index f41cfc5..bfe1eac 100644 --- a/js/scenario_runner_cli/src/main.ts +++ b/js/scenario_runner_cli/src/main.ts @@ -159,7 +159,8 @@ async function runScreenshotGen(expectedPlugin: string | undefined, expectedEntr }); if (frontendReturn.status !== 0) { - throw new Error(`Unable to run frontend, status: ${JSON.stringify(frontendReturn)}`); + const killed = mockBackendProcess.kill(); + throw new Error(`Unable to run frontend, mock backend killed: ${killed}, status: ${JSON.stringify(frontendReturn)}`); } console.log("Frontend exited")