File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -965,7 +965,6 @@ describe('generateMonthlySVG', () => {
965965 expect ( svg ) . toContain ( 'width="400"' ) ;
966966 expect ( svg ) . toContain ( 'height="200"' ) ;
967967 } ) ;
968-
969968 it ( 'includes prefers-reduced-motion media query in static monthly SVG output' , ( ) => {
970969 const svg = generateMonthlySVG ( mockMonthlyStats , {
971970 user : 'octocat' ,
@@ -987,6 +986,17 @@ describe('generateMonthlySVG', () => {
987986 expect ( svg ) . toContain ( 'transition: none !important' ) ;
988987 } ) ;
989988
989+ it ( 'includes CSS variables in auto-theme monthly SVG' , ( ) => {
990+ const svg = generateMonthlySVG ( mockMonthlyStats , {
991+ user : 'octocat' ,
992+ autoTheme : true ,
993+ } as unknown as BadgeParams ) ;
994+
995+ expect ( svg ) . toContain ( '--cp-bg' ) ;
996+ expect ( svg ) . toContain ( '--cp-accent' ) ;
997+ expect ( svg ) . toContain ( 'prefers-color-scheme: dark' ) ;
998+ } ) ;
999+
9901000 it ( 'supports dynamic Google Fonts for non-predefined fonts in monthly auto-theme mode' , ( ) => {
9911001 const svg = generateMonthlySVG ( mockMonthlyStats , {
9921002 user : 'octocat' ,
You can’t perform that action at this time.
0 commit comments