Skip to content

Commit 3c7fe5f

Browse files
committed
test: add failing test for parameterized caseCount in xcodebuild event parser
1 parent fdad5b6 commit 3c7fe5f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/utils/__tests__/xcodebuild-event-parser.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,21 @@ describe('xcodebuild-event-parser', () => {
279279
expect(types).toContain('test-failure');
280280
});
281281

282+
it('increments counts by caseCount for parameterized Swift Testing results', () => {
283+
const events = collectEvents('TEST', [
284+
{
285+
source: 'stdout',
286+
text: '✔ Test "Parameterized test" with 3 test cases passed after 0.001 seconds.\n',
287+
},
288+
]);
289+
290+
const progress = events.filter((e) => e.type === 'test-progress');
291+
expect(progress).toHaveLength(1);
292+
if (progress[0].type === 'test-progress') {
293+
expect(progress[0].completed).toBe(3);
294+
}
295+
});
296+
282297
it('skips Test Suite and Testing started noise lines without emitting events', () => {
283298
const events = collectEvents('TEST', [
284299
{ source: 'stdout', text: "Test Suite 'All tests' started at 2025-01-01 00:00:00.000.\n" },

0 commit comments

Comments
 (0)