We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e15a46a commit 4003c2eCopy full SHA for 4003c2e
1 file changed
app/api/streak/route.test.ts
@@ -249,6 +249,16 @@ describe('GET /api/streak', () => {
249
expect(response.status).toBe(200);
250
});
251
252
+ it('passes correct from/to range when ?year=2023 is provided', async () => {
253
+ await GET(makeRequest({ user: 'octocat', year: '2023' }));
254
+
255
+ expect(fetchGitHubContributions).toHaveBeenCalledWith('octocat', {
256
+ bypassCache: false,
257
+ from: '2023-01-01T00:00:00Z',
258
+ to: '2023-12-31T23:59:59Z',
259
+ });
260
261
262
it('functions normally when the year parameter is missing', async () => {
263
const response = await GET(makeRequest({ user: 'octocat' }));
264
0 commit comments