Skip to content

Commit 32ea534

Browse files
authored
remove new line chars from error text messages in testing rewrite (#22402)
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.
1 parent ff604ca commit 32ea534

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client/testing/testController/common/resultResolver.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export class PythonResultResolver implements ITestResultResolver {
153153
}).join('\r\n');
154154
const text = `${testItem.test} failed with error: ${
155155
testItem.message ?? testItem.outcome
156-
}\r\n${traceback}\r\n`;
156+
}\r\n${traceback}`;
157157
const message = new TestMessage(text);
158158

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

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

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

0 commit comments

Comments
 (0)