Skip to content

Commit ca86f7a

Browse files
committed
Strip ANSII from captured test output to fix swift-testing integration tests
1 parent 71407f3 commit ca86f7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/TestExplorer/TestRunner.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ import { BuildConfigurationFactory, TestingConfigurationFactory } from "../debug
4040
import { TestKind, isDebugging, isRelease } from "./TestKind";
4141
import { reduceTestItemChildren } from "./TestUtils";
4242
import { CompositeCancellationToken } from "../utilities/cancellation";
43+
// eslint-disable-next-line @typescript-eslint/no-require-imports
44+
import stripAnsi = require("strip-ansi");
4345

4446
export enum TestLibrary {
4547
xctest = "XCTest",
@@ -264,7 +266,7 @@ export class TestRunProxy {
264266
test?: vscode.TestItem
265267
) {
266268
testRun.appendOutput(output, location, test);
267-
this.runState.output.push(output);
269+
this.runState.output.push(stripAnsi(output));
268270
}
269271

270272
private prependIterationToOutput(output: string): string {

0 commit comments

Comments
 (0)