()
| 117 | describe('chaining and propagation', () => { |
| 118 | it('should stop propagation if any shortcut handling that key stops propagation', async () => { |
| 119 | let Component = () => { |
| 120 | let {keyboardProps} = useKeyboard({ |
| 121 | shortcuts: { |
| 122 | ArrowLeft: () => { |
| 123 | return; |
| 124 | } |
| 125 | } |
| 126 | }); |
| 127 | let {keyboardProps: keyboardProps2} = useKeyboard({ |
| 128 | shortcuts: { |
| 129 | Enter: () => { |
| 130 | return; |
| 131 | } |
| 132 | }, |
| 133 | ...keyboardProps |
| 134 | }); |
| 135 | return <button {...keyboardProps2}>Save</button>; |
| 136 | }; |
| 137 | let onKeyDown = jest.fn(); |
| 138 | render( |
| 139 | <div onKeyDown={onKeyDown}> |
nothing calls this directly
no test coverage detected