File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
exercises/07-Very-Specific-Rules Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ describe("All the styles should be applied", ()=>{
26
26
}
27
27
let reg = new RegExp ( / c o l o r : \s * r e d \s * ! i m p o r t a n t \s * ; / gm)
28
28
29
- expect ( reg . test ( color ) ) . toBeTruthy ( ) ;
29
+ expect ( reg . test ( color . toLowerCase ( ) ) ) . toBeTruthy ( ) ;
30
30
} ) ;
31
31
32
32
test ( "The ol second element background should be green" , ( ) => {
@@ -44,6 +44,14 @@ describe("All the styles should be applied", ()=>{
44
44
45
45
}
46
46
47
+ if ( background ) {
48
+ background = background . toLowerCase ( )
49
+ }
50
+
51
+ if ( backgroundColor ) {
52
+ backgroundColor = backgroundColor . toLowerCase ( )
53
+ }
54
+
47
55
} expect ( background === 'green' || backgroundColor === 'green' ) . toBeTruthy ( ) ;
48
56
} )
49
57
@@ -62,7 +70,7 @@ describe("All the styles should be applied", ()=>{
62
70
63
71
}
64
72
65
- } expect ( background === "yellow" || backgroundColor === "yellow" ) . toBeTruthy ( ) ;
73
+ } expect ( background . toLowerCase ( ) === "yellow" || backgroundColor . toLowerCase ( ) === "yellow" ) . toBeTruthy ( ) ;
66
74
} )
67
75
68
76
test ( "Write all your rules above the existing code" , ( ) => {
You can’t perform that action at this time.
0 commit comments