Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
🔨 Format output for the Test Results view
Browse files Browse the repository at this point in the history
  • Loading branch information
jenny-codes committed Aug 3, 2023
1 parent 4ae202d commit 5a69ca0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/testController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -339,4 +339,11 @@ export class TestController {

return testItem;
}

private formatResult(result: string): string {
return result
.split("\n")
.map((elem) => elem.trim())
.join("\n");
}
}

0 comments on commit 5a69ca0

Please sign in to comment.