Skip to content

Commit b36dba4

Browse files
committed
Update to latest Attachments implementation on swift-testing's main branch
1 parent f3f7b38 commit b36dba4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/TestExplorer/TestParsers/SwiftTestingOutputParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ interface RunEnded {
9797
}
9898

9999
interface ValueAttached {
100-
kind: "valueAttached";
100+
kind: "_valueAttached";
101101
_attachment: {
102102
path?: string;
103103
};
@@ -469,7 +469,7 @@ export class SwiftTestingOutputParser {
469469
this.completionMap.set(testIndex, true);
470470
runState.completed(testIndex, { timestamp: item.payload.instant.absolute });
471471
return;
472-
} else if (item.payload.kind === "valueAttached" && item.payload._attachment.path) {
472+
} else if (item.payload.kind === "_valueAttached" && item.payload._attachment.path) {
473473
const testID = this.idFromOptionalTestCase(item.payload.testID);
474474
const testIndex = this.getTestCaseIndex(runState, testID);
475475

src/TestExplorer/TestRunner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export class TestRunProxy {
281281
const testItem = this._testItems[parseInt(key)];
282282
const attachments = this.attachments[key];
283283
this.appendOutput(
284-
`\r\n${testItem.label}${SymbolRenderer.ansiEscapeCodePrefix}90m reported ${attachments.length} attachment${attachments.length === 1 ? "" : "s"}:${SymbolRenderer.resetANSIEscapeCode}`
284+
`\r\n${testItem.label}${SymbolRenderer.ansiEscapeCodePrefix}90m recorded ${attachments.length} attachment${attachments.length === 1 ? "" : "s"}:${SymbolRenderer.resetANSIEscapeCode}`
285285
);
286286

287287
for (const attachment of attachments) {
@@ -572,7 +572,7 @@ export class TestRunner {
572572
swiftTestingConfigFile,
573573
{
574574
// TODO: This ought to be a configuration file
575-
experimentalAttachmentPath: "/Users/plemarquand/Desktop/ttt",
575+
experimentalAttachmentsPath: "/Users/plemarquand/Desktop/ttt",
576576
}
577577
);
578578
const testBuildConfig = await TestingConfigurationFactory.swiftTestingConfig(
@@ -848,7 +848,7 @@ export class TestRunner {
848848
fifoPipePath,
849849
swiftTestingConfigFile,
850850
{
851-
experimentalAttachmentPath: "/Users/plemarquand/Desktop/ttt",
851+
experimentalAttachmentsPath: "/Users/plemarquand/Desktop/ttt",
852852
}
853853
);
854854

src/debugger/buildConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class BuildConfigurationFactory {
100100
}
101101

102102
interface SwiftTestingConfigFile {
103-
experimentalAttachmentPath: string | undefined;
103+
experimentalAttachmentsPath: string | undefined;
104104
}
105105

106106
export class SwiftTestingBuildAguments {

0 commit comments

Comments
 (0)