File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,30 @@ describe('generateSVG', () => {
5858 expect ( svg ) . toContain ( 'svg' ) ;
5959 } ) ;
6060
61+ it ( 'uses transparent background when hideBackground is true' , ( ) => {
62+ const svg = generateSVG (
63+ mockStats ,
64+ {
65+ user : 'avi' ,
66+ hideBackground : true ,
67+ } as unknown as BadgeParams ,
68+ mockCalendar
69+ ) ;
70+ expect ( svg ) . toContain ( 'fill="transparent"' ) ;
71+ } ) ;
72+
73+ it ( 'uses normal background when hideBackground is false or omitted' , ( ) => {
74+ const svg = generateSVG (
75+ mockStats ,
76+ {
77+ user : 'avi' ,
78+ bg : '0d1117' ,
79+ } as unknown as BadgeParams ,
80+ mockCalendar
81+ ) ;
82+ expect ( svg ) . not . toContain ( 'fill="transparent"' ) ;
83+ } ) ;
84+
6185 it ( 'generates particles for days with 10 or more contributions' , ( ) => {
6286 const svg = generateSVG ( mockStats , { user : 'avi' } as unknown as BadgeParams , mockCalendar ) ;
6387 expect ( svg ) . toContain ( 'class="heat-particles"' ) ;
You can’t perform that action at this time.
0 commit comments