File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,17 @@ describe('MediaMatcher', () => {
2121 expect ( mediaMatcher . matchMedia ( '(max-width: 1px)' ) . matches ) . toBeFalsy ( ) ;
2222 } ) ;
2323
24- it ( 'should add CSS rules for provided queries when the platform is webkit' ,
24+ it ( 'should add CSS rules for provided queries when the platform is webkit or blink ' ,
2525 inject ( [ Platform ] , ( platform : Platform ) => {
26- const randomWidth = ` ${ Math . random ( ) } px` ;
26+ const width = '123456px' ;
2727
28- expect ( getStyleTagByString ( randomWidth ) ) . toBeFalsy ( ) ;
29- mediaMatcher . matchMedia ( `(width: ${ randomWidth } )` ) ;
28+ expect ( getStyleTagByString ( width ) ) . toBeFalsy ( ) ;
29+ mediaMatcher . matchMedia ( `(width: ${ width } )` ) ;
3030
31- if ( platform . WEBKIT ) {
32- expect ( getStyleTagByString ( randomWidth ) ) . toBeTruthy ( ) ;
31+ if ( platform . WEBKIT || platform . BLINK ) {
32+ expect ( getStyleTagByString ( width ) ) . toBeTruthy ( ) ;
3333 } else {
34- expect ( getStyleTagByString ( randomWidth ) ) . toBeFalsy ( ) ;
34+ expect ( getStyleTagByString ( width ) ) . toBeFalsy ( ) ;
3535 }
3636
3737 function getStyleTagByString ( str : string ) : HTMLStyleElement | undefined {
You can’t perform that action at this time.
0 commit comments