File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -511,6 +511,28 @@ describe('generateSVG', () => {
511511 expect ( svg ) . not . toContain ( 'fill="white" fill-opacity="0.2"' ) ;
512512 } ) ;
513513 } ) ;
514+
515+ describe ( 'hide_title parameter' , ( ) => {
516+ it ( 'omits the username title text when hide_title is true' , ( ) => {
517+ const svg = generateSVG (
518+ mockStats ,
519+ { user : 'octocat' , hide_title : true } as unknown as BadgeParams ,
520+ mockCalendar
521+ ) ;
522+
523+ expect ( svg ) . not . toContain ( 'OCTOCAT' ) ;
524+ } ) ;
525+
526+ it ( 'renders the username title text when hide_title is false' , ( ) => {
527+ const svg = generateSVG (
528+ mockStats ,
529+ { user : 'octocat' , hide_title : false } as unknown as BadgeParams ,
530+ mockCalendar
531+ ) ;
532+
533+ expect ( svg ) . toContain ( 'OCTOCAT' ) ;
534+ } ) ;
535+ } ) ;
514536} ) ;
515537
516538describe ( 'generateMonthlySVG' , ( ) => {
You can’t perform that action at this time.
0 commit comments