@@ -443,15 +443,15 @@ describe('GET /api/streak', () => {
443443 it ( 'caches until UTC midnight by default, using the value from getSecondsUntilUTCMidnight' , async ( ) => {
444444 const response = await GET ( makeRequest ( { user : 'octocat' } ) ) ;
445445 expect ( response . headers . get ( 'Cache-Control' ) ) . toBe (
446- 'public, max-age=60, s-maxage=1 , stale-while-revalidate=59'
446+ 'public, max-age=60, s-maxage=3600 , stale-while-revalidate=59'
447447 ) ;
448448 } ) ;
449449
450450 it ( 'reflects a different time value when the clock changes' , async ( ) => {
451451 vi . mocked ( getSecondsUntilUTCMidnight ) . mockReturnValue ( 7200 ) ;
452452 const response = await GET ( makeRequest ( { user : 'octocat' } ) ) ;
453453 expect ( response . headers . get ( 'Cache-Control' ) ) . toBe (
454- 'public, max-age=60, s-maxage=1 , stale-while-revalidate=59'
454+ 'public, max-age=60, s-maxage=7200 , stale-while-revalidate=59'
455455 ) ;
456456 } ) ;
457457
@@ -1013,7 +1013,7 @@ describe('GET /api/streak', () => {
10131013 const response = await GET ( makeRequest ( { user : 'octocat' , tz : 'America/New_York' } ) ) ;
10141014
10151015 expect ( response . headers . get ( 'Cache-Control' ) ) . toBe (
1016- 'public, max-age=60, s-maxage=1 , stale-while-revalidate=59'
1016+ 'public, max-age=60, s-maxage=7200 , stale-while-revalidate=59'
10171017 ) ;
10181018 expect ( getSecondsUntilMidnightInTimezone ) . toHaveBeenCalledWith ( 'America/New_York' ) ;
10191019 expect ( getSecondsUntilUTCMidnight ) . not . toHaveBeenCalled ( ) ;
0 commit comments