We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7311512 + 7538218 commit a0e2593Copy full SHA for a0e2593
1 file changed
app/api/streak/route.test.ts
@@ -94,6 +94,13 @@ describe('GET /api/streak', () => {
94
95
expect(fetchGitHubContributions).not.toHaveBeenCalled();
96
});
97
+ it('returns 400 when user contains spaces', async () => {
98
+ const response = await GET(makeRequest({ user: 'john doe' }));
99
+ const body = await response.json();
100
+
101
+ expect(response.status).toBe(400);
102
+ expect(body.details.fieldErrors.user[0]).toContain('Invalid GitHub username');
103
+ });
104
105
it('returns 400 when user exceeds 39 characters', async () => {
106
const response = await GET(makeRequest({ user: 'a'.repeat(40) }));
0 commit comments