Function
createMockTextarea
(
value: string,
selectionStart: number,
selectionEnd: number,
)
Source from the content-addressed store, hash-verified
| 2 | |
| 3 | // Mock HTMLTextAreaElement |
| 4 | const createMockTextarea = ( |
| 5 | value: string, |
| 6 | selectionStart: number, |
| 7 | selectionEnd: number, |
| 8 | ) => { |
| 9 | return { |
| 10 | value, |
| 11 | selectionStart, |
| 12 | selectionEnd, |
| 13 | } as HTMLTextAreaElement; |
| 14 | }; |
| 15 | |
| 16 | describe('isSelectionInMarkdownLink', () => { |
| 17 | test('should return true when selection is inside markdown link text', () => { |
Tested by
no test coverage detected