File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
exercises/07-Very-Specific-Rules Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ describe("All the styles should be applied", ()=>{
5252 backgroundColor = backgroundColor . toLowerCase ( )
5353 }
5454
55- } expect ( background === 'green' || backgroundColor === 'green' ) . toBeTruthy ( ) ;
55+ } expect ( background && background === 'green' || backgroundColor === 'green' ) . toBeTruthy ( ) ;
5656 } )
5757
5858 test ( "The odd rows of the table should have yellow background" , ( ) => {
@@ -64,13 +64,13 @@ describe("All the styles should be applied", ()=>{
6464 let background = "" ;
6565 let backgroundColor = "" ;
6666 for ( let i = 0 ; i < cssArray . length ; i ++ ) {
67- if ( cssArray [ i ] . selectorText === "tr:nth-child(odd)" ) {
67+ if ( cssArray [ i ] . selectorText . includes ( "tr:nth-child(odd)" ) ) {
6868 background = cssArray [ i ] . style [ 'background' ] ;
6969 backgroundColor = cssArray [ i ] . style [ 'background-color' ] ;
7070
7171 }
7272
73- } expect ( background . toLowerCase ( ) === "yellow" || backgroundColor . toLowerCase ( ) === "yellow" ) . toBeTruthy ( ) ;
73+ } expect ( background && background . toLowerCase ( ) === "yellow" || backgroundColor . toLowerCase ( ) === "yellow" ) . toBeTruthy ( ) ;
7474 } )
7575
7676 test ( "Write all your rules above the existing code" , ( ) => {
You can’t perform that action at this time.
0 commit comments