Skip to content

Commit c3822f3

Browse files
authored
test(svg): add auto-theme desc accessibility test (JhaSourav07#754)
2 parents 7b48f73 + 4d1b03f commit c3822f3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/svg/generator.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,13 @@ describe('generateSVG', () => {
264264
expect(svg).not.toContain('class="cp-bg-fill"');
265265
});
266266

267+
it('includes desc element in auto-theme SVG output', () => {
268+
const svg = generateSVG(mockStats, autoParams, mockCalendar);
269+
270+
expect(svg).toContain('<desc>');
271+
expect(svg).toContain(String(mockStats.totalContributions));
272+
});
273+
267274
it('generates heat particles with CSS class instead of inline fill', () => {
268275
const svg = generateSVG(mockStats, autoParams, mockCalendar);
269276

0 commit comments

Comments
 (0)