(
key: string,
options: Partial<React.KeyboardEvent> = {}
)
| 10 | |
| 11 | describe('useKeyboardResize', () => { |
| 12 | const createKeyboardEvent = ( |
| 13 | key: string, |
| 14 | options: Partial<React.KeyboardEvent> = {} |
| 15 | ): React.KeyboardEvent => |
| 16 | ({ |
| 17 | key, |
| 18 | shiftKey: false, |
| 19 | preventDefault: vi.fn(), |
| 20 | nativeEvent: new KeyboardEvent('keydown', { key }), |
| 21 | ...options, |
| 22 | }) as unknown as React.KeyboardEvent; |
| 23 | |
| 24 | beforeEach(() => { |
| 25 | vi.clearAllMocks(); |
no outgoing calls
no test coverage detected
searching dependent graphs…