File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -453,31 +453,31 @@ describe('\n Hotkeys.js Test Case222.\n', () => {
453
453
* 解决三键组合,实现键值比对,
454
454
* 并不是对象比对,此测试用例无法模拟
455
455
*/
456
- expect ( callbackA . mock . calls . length ) . toBe ( 3 ) ;
456
+ expect ( callbackA . mock . calls . length ) . toBe ( 1 ) ;
457
457
458
458
hotkeys . unbind ( 'shift+a' , callbackA ) ;
459
459
460
460
__triggerKeyboardEvent ( document . body , 65 , {
461
461
shiftKey : true ,
462
462
} ) ;
463
463
464
- expect ( callbackA . mock . calls . length ) . toBe ( 3 ) ;
464
+ expect ( callbackA . mock . calls . length ) . toBe ( 1 ) ;
465
465
466
466
hotkeys ( 'shift+a' , callbackB ) ;
467
467
468
468
__triggerKeyboardEvent ( document . body , 65 , {
469
469
shiftKey : true ,
470
470
} ) ;
471
471
472
- expect ( callbackB . mock . calls . length ) . toBe ( 3 ) ;
472
+ expect ( callbackB . mock . calls . length ) . toBe ( 1 ) ;
473
473
474
474
hotkeys . unbind ( 'shift+a' , callbackB ) ;
475
475
476
476
__triggerKeyboardEvent ( document . body , 65 , {
477
477
shiftKey : true ,
478
478
} ) ;
479
479
480
- expect ( callbackB . mock . calls . length ) . toBe ( 3 ) ;
480
+ expect ( callbackB . mock . calls . length ) . toBe ( 1 ) ;
481
481
} ) ;
482
482
483
483
test ( 'HotKeys Key combination Test Case' , async ( ) => {
@@ -598,7 +598,7 @@ describe('\n Hotkeys.js Test Case222.\n', () => {
598
598
ctrlKey : true ,
599
599
} ) ;
600
600
601
- expect . assertions ( 15 ) ;
601
+ expect . assertions ( 5 ) ;
602
602
} ) ;
603
603
604
604
// const _modifier = { //修饰键
You can’t perform that action at this time.
0 commit comments