File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ beforeEach(() => {
58
58
</ div >
59
59
) ;
60
60
} ;
61
- renderApp = ( options = { } ) => {
61
+ renderApp = ( options ) => {
62
+ options = options || { } ;
62
63
act ( ( ) => {
63
64
render ( < App options = { options } > </ App > , container ) ;
64
65
} ) ;
@@ -444,13 +445,13 @@ describe('sort method : ', () => {
444
445
expect . assertions ( 4 ) ;
445
446
renderApp ( ) ;
446
447
return act ( ( ) => {
447
- const buttons = document . querySelectorAll ( 'button .rc-dyn-tabs-title ' ) ;
448
- expect ( buttons [ 0 ] . id ) . toBe ( 'rc-dyn-tabs-l-1' ) ;
449
- expect ( buttons [ 1 ] . id ) . toBe ( 'rc-dyn-tabs-l-2' ) ;
448
+ const lis = document . querySelectorAll ( 'li .rc-dyn-tabs-tab ' ) ;
449
+ expect ( lis [ 0 ] . id ) . toBe ( 'rc-dyn-tabs-l-1' ) ;
450
+ expect ( lis [ 1 ] . id ) . toBe ( 'rc-dyn-tabs-l-2' ) ;
450
451
return instance . sort ( [ '2' , '1' ] ) . then ( ( ) => {
451
- const buttons = document . querySelectorAll ( 'button .rc-dyn-tabs-title ' ) ;
452
- expect ( buttons [ 0 ] . id ) . toBe ( 'rc-dyn-tabs-l-2' ) ;
453
- expect ( buttons [ 1 ] . id ) . toBe ( 'rc-dyn-tabs-l-1' ) ;
452
+ const lis = document . querySelectorAll ( 'li .rc-dyn-tabs-tab ' ) ;
453
+ expect ( lis [ 0 ] . id ) . toBe ( 'rc-dyn-tabs-l-2' ) ;
454
+ expect ( lis [ 1 ] . id ) . toBe ( 'rc-dyn-tabs-l-1' ) ;
454
455
} ) ;
455
456
} ) ;
456
457
} ) ;
You can’t perform that action at this time.
0 commit comments