@@ -537,8 +537,8 @@ describe('navigation options', () => {
537537
538538 uut . processOptions ( options , CommandName . SetRoot ) ;
539539 expect ( options ) . toEqual ( {
540- statusBar : { backgroundColor : { dynamic : { light : 0xffff0000 , dark : 0xffff0000 } } } ,
541- topBar : { background : { color : { dynamic : { light : 0xff0000ff , dark : 0xff0000ff } } } } ,
540+ statusBar : { backgroundColor : 0xffff0000 } ,
541+ topBar : { background : { color : 0xff0000ff } } ,
542542 } ) ;
543543 } ) ;
544544
@@ -549,7 +549,7 @@ describe('navigation options', () => {
549549
550550 uut . processOptions ( options , CommandName . SetRoot ) ;
551551 expect ( options ) . toEqual ( {
552- topBar : { background : { color : { dynamic : { light : 'NoColor' , dark : 'NoColor' } } } } ,
552+ topBar : { background : { color : 'NoColor' } } ,
553553 } ) ;
554554 } ) ;
555555
@@ -565,11 +565,11 @@ describe('navigation options', () => {
565565 } ;
566566 uut . processOptions ( options , CommandName . SetRoot ) ;
567567 expect ( options ) . toEqual ( {
568- statusBar : { backgroundColor : { dynamic : { light : 0xffff0000 , dark : 0xffff0000 } } } ,
568+ statusBar : { backgroundColor : 0xffff0000 } ,
569569 topBar : {
570570 background : { color : { dynamic : { light : 0xff0000ff , dark : 0xffff0000 } } } ,
571571 title : {
572- color : { dynamic : { light : null , dark : null } } ,
572+ color : undefined ,
573573 } ,
574574 } ,
575575 } ) ;
@@ -585,6 +585,17 @@ describe('navigation options', () => {
585585 topBar : { background : { color : { dynamic : { light : 0xffff0000 , dark : 0xff0000ff } } } } ,
586586 } ) ;
587587 } ) ;
588+
589+ it ( 'should not process undefined value' , ( ) => {
590+ const options : Options = {
591+ topBar : { background : { color : undefined } } ,
592+ } ;
593+
594+ uut . processOptions ( options , CommandName . SetRoot ) ;
595+ expect ( options ) . toEqual ( {
596+ topBar : { background : { color : undefined } } ,
597+ } ) ;
598+ } ) ;
588599 } ) ;
589600 } ) ;
590601
@@ -748,8 +759,8 @@ describe('navigation options', () => {
748759 hideOnScroll : false ,
749760 hideTopBarOnFocus : false ,
750761 obscuresBackgroundDuringPresentation : false ,
751- backgroundColor : { dynamic : { light : null , dark : null } } ,
752- tintColor : { dynamic : { light : null , dark : null } } ,
762+ backgroundColor : undefined ,
763+ tintColor : undefined ,
753764 placeholder : '' ,
754765 } ) ;
755766 } ) ;
@@ -771,8 +782,8 @@ describe('navigation options', () => {
771782 hideOnScroll : true ,
772783 hideTopBarOnFocus : true ,
773784 obscuresBackgroundDuringPresentation : false ,
774- backgroundColor : { dynamic : { dark : 0xffff0000 , light : 0xffff0000 } } ,
775- tintColor : { dynamic : { dark : 0xff00ff00 , light : 0xff00ff00 } } ,
785+ backgroundColor : 0xffff0000 ,
786+ tintColor : 0xff00ff00 ,
776787 placeholder : 'foo' ,
777788 } ) ;
778789 } ) ;
0 commit comments