(text: string | null)
| 59 | |
| 60 | // Helper to create mock clipboard event |
| 61 | function createClipboardEvent(text: string | null): MockClipboardEvent { |
| 62 | const data = new Map<string, string>(); |
| 63 | if (text !== null) { |
| 64 | data.set('text/plain', text); |
| 65 | } |
| 66 | |
| 67 | return { |
| 68 | type: 'paste', |
| 69 | clipboardData: |
| 70 | text !== null |
| 71 | ? { |
| 72 | getData: (format: string) => data.get(format) || '', |
| 73 | setData: (format: string, value: string) => { |
| 74 | data.set(format, value); |
| 75 | }, |
| 76 | } |
| 77 | : null, |
| 78 | preventDefault: mock(() => {}), |
| 79 | stopPropagation: mock(() => {}), |
| 80 | }; |
| 81 | } |
| 82 | interface MockCompositionEvent { |
| 83 | type: string; |
| 84 | data: string | null; |
no outgoing calls
no test coverage detected
searching dependent graphs…