This repository was archived by the owner on Aug 1, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
assets/js/__tests__/utils Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ describe( 'applyStyles', () => {
9595 if ( ! el . sheet || ! el . sheet . cssRules ) {
9696 return false ;
9797 }
98- return el . sheet . cssRules . filter ( rule => rule . selectorText . startsWith ( 'body #editor .test-marker-animation-class' ) ) . length ;
98+ return el . sheet . cssRules . filter ( rule => rule . selectorText && rule . selectorText . startsWith ( 'body #editor .test-marker-animation-class' ) ) . length ;
9999 } ) ) . toHaveLength ( 5 ) ;
100100 } ) ;
101101} ) ;
@@ -108,13 +108,13 @@ describe( 'addStyle', () => {
108108 if ( ! el . sheet || ! el . sheet . cssRules ) {
109109 return false ;
110110 }
111- return el . sheet . cssRules . filter ( rule => rule . selectorText . startsWith ( 'body #editor .test-class5' ) ) . length ;
111+ return el . sheet . cssRules . filter ( rule => rule . selectorText && rule . selectorText . startsWith ( 'body #editor .test-class5' ) ) . length ;
112112 } ) ) . toHaveLength ( 2 ) ;
113113 expect ( Array . from ( document . head . children ) . filter ( el => {
114114 if ( ! el . sheet || ! el . sheet . cssRules ) {
115115 return false ;
116116 }
117- return el . sheet . cssRules . filter ( rule => rule . selectorText . startsWith ( 'body #editor .test-class6' ) ) . length ;
117+ return el . sheet . cssRules . filter ( rule => rule . selectorText && rule . selectorText . startsWith ( 'body #editor .test-class6' ) ) . length ;
118118 } ) ) . toHaveLength ( 1 ) ;
119119 } ) ;
120120} ) ;
You can’t perform that action at this time.
0 commit comments