We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6bad20 commit 7538218Copy full SHA for 7538218
1 file changed
app/api/streak/route.test.ts
@@ -90,6 +90,13 @@ describe('GET /api/streak', () => {
90
91
expect(fetchGitHubContributions).not.toHaveBeenCalled();
92
});
93
+ it('returns 400 when user contains spaces', async () => {
94
+ const response = await GET(makeRequest({ user: 'john doe' }));
95
+ const body = await response.json();
96
+
97
+ expect(response.status).toBe(400);
98
+ expect(body.details.fieldErrors.user[0]).toContain('Invalid GitHub username');
99
+ });
100
101
it('returns 400 for invalid monthly badge dimensions', async () => {
102
const invalidDimensionParams: Array<Record<string, string>> = [
0 commit comments