Skip to content

Commit b872f25

Browse files
committed
test(svg): add accessibility metadata assertions for SVG output
1 parent c449e64 commit b872f25

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

lib/svg/generator.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,18 @@ describe('generateSVG', () => {
376376

377377
expect(svg).not.toContain('attributeName="opacity" values="1;0.4;1"');
378378
});
379+
it('includes accessible title and description metadata', () => {
380+
const svg = generateSVG(
381+
mockStats,
382+
{ user: 'octocat' } as unknown as BadgeParams,
383+
mockCalendar
384+
);
385+
386+
expect(svg).toContain('<title>CommitPulse Stats for octocat</title>');
387+
expect(svg).toContain('<desc>');
388+
expect(svg).toContain('100');
389+
expect(svg).toContain('10');
390+
});
379391
});
380392
});
381393

0 commit comments

Comments
 (0)