Skip to content

Commit 255ecb4

Browse files
committed
fix: preserve suiteName in Swift Testing issue parser
The lastIssueDiagnostic type was missing suiteName, causing it to be silently dropped when parsing Swift Testing issue lines. The emitted test-failure event now correctly includes the suite field.
1 parent d922fd7 commit 255ecb4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/swift-testing-event-parser.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export function createSwiftTestingEventParser(
3737
let skippedCount = 0;
3838

3939
let lastIssueDiagnostic: {
40+
suiteName?: string;
4041
testName?: string;
4142
message: string;
4243
location?: string;
@@ -50,6 +51,7 @@ export function createSwiftTestingEventParser(
5051
type: 'test-failure',
5152
timestamp: now(),
5253
operation: 'TEST',
54+
suite: lastIssueDiagnostic.suiteName,
5355
test: lastIssueDiagnostic.testName,
5456
message: lastIssueDiagnostic.message,
5557
location: lastIssueDiagnostic.location,
@@ -88,6 +90,7 @@ export function createSwiftTestingEventParser(
8890
const issue = parseSwiftTestingIssueLine(line);
8991
if (issue) {
9092
lastIssueDiagnostic = {
93+
suiteName: issue.suiteName,
9194
testName: issue.testName,
9295
message: issue.message,
9396
location: issue.location,

0 commit comments

Comments
 (0)