(
code: string,
key: string,
modifiers: { ctrl?: boolean; alt?: boolean; shift?: boolean; meta?: boolean } = {}
)
| 40 | |
| 41 | // Helper to create mock keyboard event |
| 42 | function createKeyEvent( |
| 43 | code: string, |
| 44 | key: string, |
| 45 | modifiers: { ctrl?: boolean; alt?: boolean; shift?: boolean; meta?: boolean } = {} |
| 46 | ): MockKeyboardEvent { |
| 47 | return { |
| 48 | code, |
| 49 | key, |
| 50 | ctrlKey: modifiers.ctrl ?? false, |
| 51 | altKey: modifiers.alt ?? false, |
| 52 | shiftKey: modifiers.shift ?? false, |
| 53 | metaKey: modifiers.meta ?? false, |
| 54 | repeat: false, |
| 55 | preventDefault: mock(() => {}), |
| 56 | stopPropagation: mock(() => {}), |
| 57 | }; |
| 58 | } |
| 59 | |
| 60 | // Helper to create mock clipboard event |
| 61 | function createClipboardEvent(text: string | null): MockClipboardEvent { |
no outgoing calls
no test coverage detected
searching dependent graphs…