@@ -557,6 +557,61 @@ it('transforms box-shadow and enforces offset-y if offset-x present', () => {
557
557
)
558
558
} )
559
559
560
+ it ( 'transforms text-decoration into text-decoration- properties' , ( ) =>
561
+ runTest ( [ [ 'text-decoration' , 'underline dotted red' ] ] , {
562
+ textDecorationLine : 'underline' ,
563
+ textDecorationStyle : 'dotted' ,
564
+ textDecorationColor : 'red' ,
565
+ } ) )
566
+
567
+ it ( 'transforms text-decoration without color' , ( ) =>
568
+ runTest ( [ [ 'text-decoration' , 'underline dotted' ] ] , {
569
+ textDecorationLine : 'underline' ,
570
+ textDecorationStyle : 'dotted' ,
571
+ textDecorationColor : 'black' ,
572
+ } ) )
573
+
574
+ it ( 'transforms text-decoration without style' , ( ) =>
575
+ runTest ( [ [ 'text-decoration' , 'underline red' ] ] , {
576
+ textDecorationLine : 'underline' ,
577
+ textDecorationStyle : 'solid' ,
578
+ textDecorationColor : 'red' ,
579
+ } ) )
580
+
581
+ it ( 'transforms text-decoration without style and color' , ( ) =>
582
+ runTest ( [ [ 'text-decoration' , 'underline' ] ] , {
583
+ textDecorationLine : 'underline' ,
584
+ textDecorationStyle : 'solid' ,
585
+ textDecorationColor : 'black' ,
586
+ } ) )
587
+
588
+ it ( 'transforms text-decoration with two line properties' , ( ) =>
589
+ runTest ( [ [ 'text-decoration' , 'underline line-through dashed red' ] ] , {
590
+ textDecorationLine : 'underline line-through' ,
591
+ textDecorationStyle : 'dashed' ,
592
+ textDecorationColor : 'red' ,
593
+ } ) )
594
+
595
+ it ( 'transforms text-decoration in different order' , ( ) =>
596
+ runTest ( [ [ 'text-decoration' , 'dashed red underline line-through' ] ] , {
597
+ textDecorationLine : 'underline line-through' ,
598
+ textDecorationStyle : 'dashed' ,
599
+ textDecorationColor : 'red' ,
600
+ } ) )
601
+
602
+ it ( 'transforms text-decoration with none' , ( ) =>
603
+ runTest ( [ [ 'text-decoration' , 'none' ] ] , {
604
+ textDecorationLine : 'none' ,
605
+ textDecorationStyle : 'solid' ,
606
+ textDecorationColor : 'black' ,
607
+ } ) )
608
+
609
+ it ( 'does not transform text-decoration if multiple colors are used' , ( ) => {
610
+ expect ( ( ) =>
611
+ transformCss ( [ [ 'text-decoration' , 'underline red yellow' ] ] )
612
+ ) . toThrow ( )
613
+ } )
614
+
560
615
it ( 'allows blacklisting shorthands' , ( ) => {
561
616
const actualStyles = transformCss ( [ [ 'border-radius' , '50' ] ] , [ 'borderRadius' ] )
562
617
expect ( actualStyles ) . toEqual ( { borderRadius : 50 } )
0 commit comments