@@ -31,20 +31,20 @@ describe('keydownControl', () => {
31
31
32
32
const pressKey = ( keyCode , options = { } ) => {
33
33
const event = new KeyboardEvent ( 'keydown' , {
34
- keyCode,
35
- ...options
34
+ keyCode,
35
+ ...options
36
36
} ) ;
37
37
38
38
// Allow setting target after event creation
39
39
if ( options . target ) {
40
- Object . defineProperty ( event , 'target' , {
41
- value : options . target ,
42
- enumerable : true
43
- } ) ;
40
+ Object . defineProperty ( event , 'target' , {
41
+ value : options . target ,
42
+ enumerable : true
43
+ } ) ;
44
44
}
45
45
46
46
if ( options . testPreventDefault ) {
47
- event . preventDefault = jest . fn ( ) ;
47
+ event . preventDefault = jest . fn ( ) ;
48
48
}
49
49
50
50
keydownControl . handleKeyDown ( event ) ;
@@ -56,7 +56,7 @@ describe('keydownControl', () => {
56
56
expect ( mockDispatch ) . toHaveBeenCalledWith ( expectedAction ) ;
57
57
58
58
if ( options . testPreventDefault ) {
59
- expect ( event . preventDefault ) . toHaveBeenCalled ( ) ;
59
+ expect ( event . preventDefault ) . toHaveBeenCalled ( ) ;
60
60
}
61
61
} ;
62
62
@@ -67,11 +67,11 @@ describe('keydownControl', () => {
67
67
68
68
describe ( 'basic keyboard shortcuts' , ( ) => {
69
69
it ( 'should handle space key for play/pause when no menu is open' , ( ) => {
70
- expectDispatch (
71
- KeyCode . KEY_SPACE ,
72
- { type : 'watch/onPlayPauseClick' } ,
73
- { testPreventDefault : true }
74
- ) ;
70
+ expectDispatch (
71
+ KeyCode . KEY_SPACE ,
72
+ { type : 'watch/onPlayPauseClick' } ,
73
+ { testPreventDefault : true }
74
+ ) ;
75
75
} ) ;
76
76
77
77
it ( 'should not trigger play/pause when menu is open' , ( ) => {
0 commit comments