File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,37 @@ test('invalid colors return a default object', () => {
6666 } )
6767} )
6868
69+ test ( 'converts `transparent` to 0% opacity black' , ( ) => {
70+ const transparent = convert ( 'transparent' )
71+ assert . equal ( transparent , {
72+ hue : 0 ,
73+ saturation : 0 ,
74+ lightness : 0 ,
75+ alpha : 0 ,
76+ authored : 'transparent'
77+ } )
78+ } )
79+
80+ test ( 'converts `inherit` to 0% opacity black' , ( ) => {
81+ assert . equal ( convert ( 'inherit' ) , {
82+ hue : 0 ,
83+ saturation : 0 ,
84+ lightness : 0 ,
85+ alpha : 0 ,
86+ authored : 'inherit'
87+ } )
88+ } )
89+
90+ test ( 'converts `currrentcolor` to 0% opacity black' , ( ) => {
91+ assert . equal ( convert ( 'currentcolor' ) , {
92+ hue : 0 ,
93+ saturation : 0 ,
94+ lightness : 0 ,
95+ alpha : 0 ,
96+ authored : 'currentcolor'
97+ } )
98+ } )
99+
69100test ( 'comparing two colors' , ( ) => {
70101 const a = convert ( 'red' )
71102 const b = convert ( 'blue' )
You can’t perform that action at this time.
0 commit comments