Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion lib/svg/generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,6 @@ describe('generateMonthlySVG', () => {
expect(svg).toContain('width="400"');
expect(svg).toContain('height="200"');
});

it('includes prefers-reduced-motion media query in static monthly SVG output', () => {
const svg = generateMonthlySVG(mockMonthlyStats, {
user: 'octocat',
Expand All @@ -987,6 +986,17 @@ describe('generateMonthlySVG', () => {
expect(svg).toContain('transition: none !important');
});

it('includes CSS variables in auto-theme monthly SVG', () => {
const svg = generateMonthlySVG(mockMonthlyStats, {
user: 'octocat',
autoTheme: true,
} as unknown as BadgeParams);

expect(svg).toContain('--cp-bg');
expect(svg).toContain('--cp-accent');
expect(svg).toContain('prefers-color-scheme: dark');
});

it('supports dynamic Google Fonts for non-predefined fonts in monthly auto-theme mode', () => {
const svg = generateMonthlySVG(mockMonthlyStats, {
user: 'octocat',
Expand Down
Loading