Skip to content

Commit a98680c

Browse files
committed
test(streak route): verify content type for named themes
1 parent d37d7de commit a98680c

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
@@ -373,6 +373,24 @@ describe('GET /api/streak', () => {
373373
expect(response.status).toBe(200);
374374
});
375375

376+
it('returns SVG content type for theme=neon', async () => {
377+
const response = await GET(makeRequest({ user: 'octocat', theme: 'neon' }));
378+
379+
expect(response.headers.get('Content-Type')).toBe('image/svg+xml');
380+
});
381+
382+
it('returns SVG content type for theme=dracula', async () => {
383+
const response = await GET(makeRequest({ user: 'octocat', theme: 'dracula' }));
384+
385+
expect(response.headers.get('Content-Type')).toBe('image/svg+xml');
386+
});
387+
388+
it('returns SVG content type for theme=auto', async () => {
389+
const response = await GET(makeRequest({ user: 'octocat', theme: 'auto' }));
390+
391+
expect(response.headers.get('Content-Type')).toBe('image/svg+xml');
392+
});
393+
376394
it('returns auto-theme SVG markup with dark-mode CSS variables when theme=auto', async () => {
377395
const response = await GET(makeRequest({ user: 'octocat', theme: 'auto' }));
378396
const body = await response.text();

0 commit comments

Comments
 (0)