File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,17 @@ describe('MediaMatcher', () => {
21
21
expect ( mediaMatcher . matchMedia ( '(max-width: 1px)' ) . matches ) . toBeFalsy ( ) ;
22
22
} ) ;
23
23
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 ' ,
25
25
inject ( [ Platform ] , ( platform : Platform ) => {
26
- const randomWidth = ` ${ Math . random ( ) } px` ;
26
+ const width = '123456px' ;
27
27
28
- expect ( getStyleTagByString ( randomWidth ) ) . toBeFalsy ( ) ;
29
- mediaMatcher . matchMedia ( `(width: ${ randomWidth } )` ) ;
28
+ expect ( getStyleTagByString ( width ) ) . toBeFalsy ( ) ;
29
+ mediaMatcher . matchMedia ( `(width: ${ width } )` ) ;
30
30
31
- if ( platform . WEBKIT ) {
32
- expect ( getStyleTagByString ( randomWidth ) ) . toBeTruthy ( ) ;
31
+ if ( platform . WEBKIT || platform . BLINK ) {
32
+ expect ( getStyleTagByString ( width ) ) . toBeTruthy ( ) ;
33
33
} else {
34
- expect ( getStyleTagByString ( randomWidth ) ) . toBeFalsy ( ) ;
34
+ expect ( getStyleTagByString ( width ) ) . toBeFalsy ( ) ;
35
35
}
36
36
37
37
function getStyleTagByString ( str : string ) : HTMLStyleElement | undefined {
You can’t perform that action at this time.
0 commit comments