@@ -8,3 +8,30 @@ it('transforms border color with multiple values', () => {
88 borderLeftColor : 'blue' ,
99 } )
1010} )
11+
12+ it ( 'transforms border color with hex color' , ( ) => {
13+ expect ( transformCss ( [ [ 'border-color' , '#f00' ] ] ) ) . toEqual ( {
14+ borderBottomColor : '#f00' ,
15+ borderLeftColor : '#f00' ,
16+ borderRightColor : '#f00' ,
17+ borderTopColor : '#f00' ,
18+ } )
19+ } )
20+
21+ it ( 'transforms border color with rgb color' , ( ) => {
22+ expect ( transformCss ( [ [ 'border-color' , 'rgb(255, 0, 0)' ] ] ) ) . toEqual ( {
23+ borderBottomColor : 'rgb(255, 0, 0)' ,
24+ borderLeftColor : 'rgb(255, 0, 0)' ,
25+ borderRightColor : 'rgb(255, 0, 0)' ,
26+ borderTopColor : 'rgb(255, 0, 0)' ,
27+ } )
28+ } )
29+
30+ it ( 'transforms border color with rgba color' , ( ) => {
31+ expect ( transformCss ( [ [ 'border-color' , 'rgba(255, 0, 0, 0.1)' ] ] ) ) . toEqual ( {
32+ borderBottomColor : 'rgba(255, 0, 0, 0.1)' ,
33+ borderLeftColor : 'rgba(255, 0, 0, 0.1)' ,
34+ borderRightColor : 'rgba(255, 0, 0, 0.1)' ,
35+ borderTopColor : 'rgba(255, 0, 0, 0.1)' ,
36+ } )
37+ } )
0 commit comments