Skip to content

Commit 8655aea

Browse files
authored
test(streak route): add Content-Type checks for theme variants (JhaSourav07#810)
test(streak route): verify content type for named themes
2 parents ae074a8 + a98680c commit 8655aea

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

app/api/streak/route.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,24 @@ describe('GET /api/streak', () => {
395395
expect(response.status).toBe(200);
396396
});
397397

398+
it('returns SVG content type for theme=neon', async () => {
399+
const response = await GET(makeRequest({ user: 'octocat', theme: 'neon' }));
400+
401+
expect(response.headers.get('Content-Type')).toBe('image/svg+xml');
402+
});
403+
404+
it('returns SVG content type for theme=dracula', async () => {
405+
const response = await GET(makeRequest({ user: 'octocat', theme: 'dracula' }));
406+
407+
expect(response.headers.get('Content-Type')).toBe('image/svg+xml');
408+
});
409+
410+
it('returns SVG content type for theme=auto', async () => {
411+
const response = await GET(makeRequest({ user: 'octocat', theme: 'auto' }));
412+
413+
expect(response.headers.get('Content-Type')).toBe('image/svg+xml');
414+
});
415+
398416
it('returns auto-theme SVG markup with dark-mode CSS variables when theme=auto', async () => {
399417
const response = await GET(makeRequest({ user: 'octocat', theme: 'auto' }));
400418
const body = await response.text();

0 commit comments

Comments
 (0)