File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -472,4 +472,24 @@ describe('GET /api/streak', () => {
472472 expect ( response . headers . get ( 'Cache-Control' ) ) . toBe ( 'no-cache, no-store, must-revalidate' ) ;
473473 } ) ;
474474 } ) ;
475+
476+ describe ( 'Ghost City Mode (route integration)' , ( ) => {
477+ it ( 'returns ghost city SVG when user has 0 total contributions' , async ( ) => {
478+ const emptyCalendar : ContributionCalendar = {
479+ totalContributions : 0 ,
480+ weeks : [
481+ {
482+ contributionDays : [ { contributionCount : 0 , date : '2024-06-10' } ] ,
483+ } ,
484+ ] ,
485+ } ;
486+
487+ vi . mocked ( fetchGitHubContributions ) . mockResolvedValue ( emptyCalendar ) ;
488+ const response = await GET ( makeRequest ( { user : 'octocat' } ) ) ;
489+ const body = await response . text ( ) ;
490+
491+ expect ( body ) . toContain ( 'stroke-width="0.5"' ) ;
492+ expect ( body ) . toContain ( 'stroke-opacity="0.3"' ) ;
493+ } ) ;
494+ } ) ;
475495} ) ;
You can’t perform that action at this time.
0 commit comments