From 5a69ca0b0ef88323fe2cb724aec1ba816a942ac8 Mon Sep 17 00:00:00 2001 From: Jenny Shih Date: Thu, 3 Aug 2023 15:58:59 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Format=20output=20for=20the=20Te?= =?UTF-8?q?st=20Results=20view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/testController.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/testController.ts b/src/testController.ts index cfbedab9..81ea0e0c 100644 --- a/src/testController.ts +++ b/src/testController.ts @@ -265,7 +265,7 @@ export class TestController { cwd: this.workingFolder, env: this.ruby.env, }); - return result.stdout; + return this.formatResult(result.stdout); } catch (error: any) { throw new Error(error.stdout); } @@ -339,4 +339,11 @@ export class TestController { return testItem; } + + private formatResult(result: string): string { + return result + .split("\n") + .map((elem) => elem.trim()) + .join("\n"); + } }