@@ -25,6 +25,23 @@ describe('themeParams', () => {
25
25
} ) ) . toBe ( true ) ;
26
26
expect ( is ( themeParams ( ) , { accent_text_color : '#aabbc' } ) ) . toBe ( false ) ;
27
27
expect ( is ( themeParams ( ) , 'aaa' ) ) . toBe ( false ) ;
28
+ expect ( is ( themeParams ( ) , {
29
+ accent_text_color : - 10177041 ,
30
+ bg_color : - 14602949 ,
31
+ bottom_bar_bg_color : - 15393241 ,
32
+ button_color : - 11491093 ,
33
+ button_text_color : - 1 ,
34
+ destructive_text_color : - 1152913 ,
35
+ header_bg_color : - 14406343 ,
36
+ hint_color : - 8549479 ,
37
+ link_color : - 10572831 ,
38
+ secondary_bg_color : - 15393241 ,
39
+ section_bg_color : - 14866637 ,
40
+ section_header_text_color : - 8796932 ,
41
+ section_separator_color : - 15920616 ,
42
+ subtitle_text_color : - 8681584 ,
43
+ text_color : - 1 ,
44
+ } ) ) . toBe ( true ) ;
28
45
} ) ;
29
46
30
47
it ( 'should camelize keys if true passed' , ( ) => {
@@ -67,4 +84,40 @@ describe('themeParams', () => {
67
84
expect ( parse ( themeParams ( false ) , input ) ) . not . toStrictEqual ( inputCamelized ) ;
68
85
expect ( parse ( themeParams ( true ) , input ) ) . toStrictEqual ( inputCamelized ) ;
69
86
} ) ;
87
+
88
+ it ( 'should properly handle numeric values' , ( ) => {
89
+ expect ( parse ( themeParams ( ) , {
90
+ accent_text_color : - 10177041 ,
91
+ bg_color : - 14602949 ,
92
+ bottom_bar_bg_color : - 15393241 ,
93
+ button_color : - 11491093 ,
94
+ button_text_color : - 1 ,
95
+ destructive_text_color : - 1152913 ,
96
+ header_bg_color : - 14406343 ,
97
+ hint_color : - 8549479 ,
98
+ link_color : - 10572831 ,
99
+ secondary_bg_color : - 15393241 ,
100
+ section_bg_color : - 14866637 ,
101
+ section_header_text_color : - 8796932 ,
102
+ section_separator_color : - 15920616 ,
103
+ subtitle_text_color : - 8681584 ,
104
+ text_color : - 1 ,
105
+ } ) ) . toStrictEqual ( {
106
+ accent_text_color : '#64b5ef' ,
107
+ bg_color : '#212d3b' ,
108
+ bottom_bar_bg_color : '#151e27' ,
109
+ button_color : '#50a8eb' ,
110
+ button_text_color : '#ffffff' ,
111
+ destructive_text_color : '#ee686f' ,
112
+ header_bg_color : '#242d39' ,
113
+ hint_color : '#7d8b99' ,
114
+ link_color : '#5eabe1' ,
115
+ secondary_bg_color : '#151e27' ,
116
+ section_bg_color : '#1d2733' ,
117
+ section_header_text_color : '#79c4fc' ,
118
+ section_separator_color : '#0d1218' ,
119
+ subtitle_text_color : '#7b8790' ,
120
+ text_color : '#ffffff' ,
121
+ } ) ;
122
+ } ) ;
70
123
} ) ;
0 commit comments