@@ -541,12 +541,7 @@ describe('onChange callback : ', () => {
541
541
currentData . selectedTabID = '6' ;
542
542
previousData . selectedTabID = '6' ;
543
543
} ) ;
544
- const onChange2 = jest . fn ( ( { currentData, previousData, closedTabIDs, openedTabIDs} ) => {
545
- closedTabIDs . push ( '7' ) ;
546
- openedTabIDs . push ( '7' ) ;
547
- currentData . selectedTabID = '7' ;
548
- previousData . selectedTabID = '7' ;
549
- } ) ;
544
+ const onChange2 = jest . fn ( ( { currentData, previousData, closedTabIDs, openedTabIDs} ) => { } ) ;
550
545
const onOpen = jest . fn ( ( ) => { } ) ;
551
546
const onClose = jest . fn ( ( ) => { } ) ;
552
547
const onSelect = jest . fn ( ( ) => { } ) ;
@@ -595,6 +590,9 @@ describe('onChange callback : ', () => {
595
590
expect ( this . hasOwnProperty ( 'getData' ) ) . toBe ( true ) ;
596
591
} ) ;
597
592
renderApp ( ) ;
593
+ act ( ( ) => {
594
+ instance . select ( '2' ) ;
595
+ } ) ;
598
596
op . onChange = function ( ) { } ;
599
597
} ) ;
600
598
} ) ;
@@ -620,9 +618,7 @@ describe('onSelect callback : ', () => {
620
618
const onSelect1 = jest . fn ( ( param ) => {
621
619
param . previousSelectedTabId = 19 ;
622
620
} ) ;
623
- const onSelect2 = jest . fn ( ( param ) => {
624
- param . previousSelectedTabId = 20 ;
625
- } ) ;
621
+ const onSelect2 = jest . fn ( ( param ) => { } ) ;
626
622
act ( ( ) => {
627
623
instance . setOption ( 'onSelect' , ( param ) => {
628
624
param . currentSelectedTabId = 10 ;
@@ -644,6 +640,9 @@ describe('onSelect callback : ', () => {
644
640
expect ( this . hasOwnProperty ( 'getData' ) ) . toBe ( true ) ;
645
641
} ) ;
646
642
renderApp ( ) ;
643
+ act ( ( ) => {
644
+ instance . select ( '2' ) ;
645
+ } ) ;
647
646
op . onSelect = function ( ) { } ;
648
647
} ) ;
649
648
} ) ;
@@ -686,9 +685,7 @@ describe('onFirstSelect callback : ', () => {
686
685
const onFirstSelect1 = jest . fn ( ( param ) => {
687
686
param . previousSelectedTabId = 19 ;
688
687
} ) ;
689
- const onFirstSelect2 = jest . fn ( ( param ) => {
690
- param . previousSelectedTabId = 20 ;
691
- } ) ;
688
+ const onFirstSelect2 = jest . fn ( ( param ) => { } ) ;
692
689
act ( ( ) => {
693
690
instance . setOption ( 'onFirstSelect' , ( param ) => {
694
691
param . currentSelectedTabId = 10 ;
@@ -709,6 +706,9 @@ describe('onFirstSelect callback : ', () => {
709
706
expect ( this . hasOwnProperty ( 'getData' ) ) . toBe ( true ) ;
710
707
} ) ;
711
708
renderApp ( ) ;
709
+ act ( ( ) => {
710
+ instance . select ( '2' ) ;
711
+ } ) ;
712
712
op . onFirstSelect = function ( ) { } ;
713
713
} ) ;
714
714
} ) ;
@@ -730,9 +730,7 @@ describe('onOpen callback : ', () => {
730
730
const onOpen1 = jest . fn ( ( openedTabIDs ) => {
731
731
openedTabIDs . push ( '5' ) ;
732
732
} ) ;
733
- const onOpen2 = jest . fn ( ( openedTabIDs ) => {
734
- openedTabIDs . push ( '6' ) ;
735
- } ) ;
733
+ const onOpen2 = jest . fn ( ( openedTabIDs ) => { } ) ;
736
734
act ( ( ) => {
737
735
instance . setOption ( 'onOpen' , ( openedTabIDs ) => {
738
736
openedTabIDs . push ( '4' ) ;
@@ -750,6 +748,9 @@ describe('onOpen callback : ', () => {
750
748
expect ( this . hasOwnProperty ( 'getData' ) ) . toBe ( true ) ;
751
749
} ) ;
752
750
renderApp ( ) ;
751
+ act ( ( ) => {
752
+ instance . open ( { id :'3' } ) ;
753
+ } ) ;
753
754
op . onOpen = function ( ) { } ;
754
755
} ) ;
755
756
} ) ;
@@ -771,9 +772,7 @@ describe('onClose callback : ', () => {
771
772
const onClose1 = jest . fn ( ( closedTabIDs ) => {
772
773
closedTabIDs . push ( '4' ) ;
773
774
} ) ;
774
- const onClose2 = jest . fn ( ( closedTabIDs ) => {
775
- closedTabIDs . push ( '5' ) ;
776
- } ) ;
775
+ const onClose2 = jest . fn ( ( closedTabIDs ) => { } ) ;
777
776
act ( ( ) => {
778
777
instance . setOption ( 'onClose' , ( closedTabIDs ) => {
779
778
closedTabIDs . push ( '3' ) ;
@@ -791,6 +790,9 @@ describe('onClose callback : ', () => {
791
790
expect ( this . hasOwnProperty ( 'getData' ) ) . toBe ( true ) ;
792
791
} ) ;
793
792
renderApp ( ) ;
793
+ act ( ( ) => {
794
+ instance . close ( '2' ) ;
795
+ } ) ;
794
796
op . onClose = function ( ) { } ;
795
797
} ) ;
796
798
} ) ;
0 commit comments