File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -750,11 +750,19 @@ describe('mix()', () => {
750750 it ( 'should handle 3-digit hex colors' , ( ) => {
751751 expect ( mix ( '#000' , '#fff' , '50%' ) ) . toBe ( '#808080' ) ;
752752 expect ( mix ( '#f00' , '#0f0' , '50%' ) ) . toBe ( '#808000' ) ;
753+
754+ // 3-digit + 6-digit
755+ expect ( mix ( '#000' , '#ffffff' , '50%' ) ) . toBe ( '#808080' ) ;
756+ expect ( mix ( '#000000' , '#fff' , '50%' ) ) . toBe ( '#808080' ) ;
753757 } ) ;
754758
755759 it ( 'should handle hex colors without hash prefix' , ( ) => {
756760 expect ( mix ( '000000' , 'ffffff' , '50%' ) ) . toBe ( '#808080' ) ;
757761 expect ( mix ( 'f00' , '0f0' , '50%' ) ) . toBe ( '#808000' ) ;
762+
763+ // With and without hash prefix
764+ expect ( mix ( '#000000' , 'ffffff' , '50%' ) ) . toBe ( '#808080' ) ;
765+ expect ( mix ( 'f00' , '#0f0' , '50%' ) ) . toBe ( '#808000' ) ;
758766 } ) ;
759767
760768 it ( 'should handle fractional percentages' , ( ) => {
You can’t perform that action at this time.
0 commit comments