File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
projects/libs/flex-layout/flex/flex Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ import {
2727 FlexStyleBuilder ,
2828} from '@ngbracket/ngx-layout/flex' ;
2929
30+ function getSafariMajorVersion ( ) : number {
31+ const ua = navigator . userAgent ;
32+ const match = / V e r s i o n \/ ( \d + ) / . exec ( ua ) ;
33+ return match ? Number . parseInt ( match [ 1 ] , 10 ) : 0 ;
34+ }
35+
3036describe ( 'flex directive' , ( ) => {
3137 let fixture : ComponentFixture < any > ;
3238 let mediaController : MockMatchMedia ;
@@ -424,15 +430,15 @@ describe('flex directive', () => {
424430 } ,
425431 styler
426432 ) ;
427- } else if ( platform . FIREFOX || platform . WEBKIT || platform . IOS ) {
433+ } else if ( platform . FIREFOX ) {
428434 expectEl ( element ) . toHaveInlineStyle (
429435 {
430436 flex : '1 1 1e-9px' ,
431437 'box-sizing' : 'border-box' ,
432438 } ,
433439 styler
434440 ) ;
435- } else if ( platform . EDGE ) {
441+ } else if ( platform . EDGE || platform . WEBKIT || platform . IOS ) {
436442 expectEl ( element ) . toHaveInlineStyle (
437443 {
438444 flex : '1 1 0px' ,
You can’t perform that action at this time.
0 commit comments