Skip to content

Commit

Permalink
remove new line chars from error text messages in testing rewrite (#2…
Browse files Browse the repository at this point in the history
…2402)

fixes #21512 where 2
extra new lines were seen at the end of an error message popup. Removing
these will restrict stop this from occurring.
  • Loading branch information
eleanorjboyd authored Nov 2, 2023
1 parent ff604ca commit 32ea534
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/testing/testController/common/resultResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class PythonResultResolver implements ITestResultResolver {
}).join('\r\n');
const text = `${testItem.test} failed with error: ${
testItem.message ?? testItem.outcome
}\r\n${traceback}\r\n`;
}\r\n${traceback}`;
const message = new TestMessage(text);

const grabVSid = this.runIdToVSid.get(keyTemp);
Expand All @@ -173,7 +173,7 @@ export class PythonResultResolver implements ITestResultResolver {
removeEmptyEntries: true,
}).join('\r\n');

const text = `${testItem.test} failed: ${testItem.message ?? testItem.outcome}\r\n${traceback}\r\n`;
const text = `${testItem.test} failed: ${testItem.message ?? testItem.outcome}\r\n${traceback}`;
const message = new TestMessage(text);

// note that keyTemp is a runId for unittest library...
Expand Down Expand Up @@ -235,7 +235,7 @@ export class PythonResultResolver implements ITestResultResolver {
const traceback = data.traceback ?? '';
const text = `${data.subtest} failed: ${
testItem.message ?? testItem.outcome
}\r\n${traceback}\r\n`;
}\r\n${traceback}`;
parentTestItem.children.add(subTestItem);
runInstance.started(subTestItem);
const message = new TestMessage(text);
Expand Down

0 comments on commit 32ea534

Please sign in to comment.