We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4538996 commit 6be4353Copy full SHA for 6be4353
1 file changed
app/api/streak/route.test.ts
@@ -437,6 +437,16 @@ describe('GET /api/streak', () => {
437
});
438
439
440
+ it('passes correct from/to range when ?year=2008 is provided', async () => {
441
+ await GET(makeRequest({ user: 'octocat', year: '2008' }));
442
+
443
+ expect(fetchGitHubContributions).toHaveBeenCalledWith('octocat', {
444
+ bypassCache: false,
445
+ from: '2008-01-01T00:00:00Z',
446
+ to: '2008-12-31T23:59:59Z',
447
+ });
448
449
450
it('functions normally when the year parameter is missing', async () => {
451
const response = await GET(makeRequest({ user: 'octocat' }));
452
0 commit comments