File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
__tests__/tests/utilities Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ import { getFontColorByBackground } from 'utils' ;
2+
3+ describe ( 'Color Helpers' , ( ) => {
4+ it ( 'should return a black font color for the light yellow background' , ( ) => {
5+ const lightYellowColor = 'e5f496' ;
6+ expect ( getFontColorByBackground ( lightYellowColor ) ) . toBe ( '#000000' ) ;
7+ } ) ;
8+
9+ it ( 'should return a black font color for the light blue background' , ( ) => {
10+ const lightBlueColor = 'a9b3ff' ;
11+ expect ( getFontColorByBackground ( lightBlueColor ) ) . toBe ( '#000000' ) ;
12+ } ) ;
13+
14+ it ( 'should return a black font color for the light red background' , ( ) => {
15+ const lightRedColor = 'f4ad96' ;
16+ expect ( getFontColorByBackground ( lightRedColor ) ) . toBe ( '#000000' ) ;
17+ } ) ;
18+
19+ it ( 'should return a white font color for the dark green background' , ( ) => {
20+ const darkGreenColor = '288702' ;
21+ expect ( getFontColorByBackground ( darkGreenColor ) ) . toBe ( '#ffffff' ) ;
22+ } ) ;
23+
24+ it ( 'should return a white font color for the dark blue background' , ( ) => {
25+ const darkBlueColor = '0800fd' ;
26+ expect ( getFontColorByBackground ( darkBlueColor ) ) . toBe ( '#ffffff' ) ;
27+ } ) ;
28+
29+ it ( 'should return a white font color for the dark red background' , ( ) => {
30+ const darkRedColor = 'fd0000' ;
31+ expect ( getFontColorByBackground ( darkRedColor ) ) . toBe ( '#ffffff' ) ;
32+ } ) ;
33+ } ) ;
You can’t perform that action at this time.
0 commit comments