MCPcopy Create free account
hub / github.com/dailydotdev/apps / createMockTextarea

Function createMockTextarea

packages/shared/src/lib/__tests__/markdown.test.ts:4–14  ·  view source on GitHub ↗
(
  value: string,
  selectionStart: number,
  selectionEnd: number,
)

Source from the content-addressed store, hash-verified

2
3// Mock HTMLTextAreaElement
4const createMockTextarea = (
5 value: string,
6 selectionStart: number,
7 selectionEnd: number,
8) => {
9 return {
10 value,
11 selectionStart,
12 selectionEnd,
13 } as HTMLTextAreaElement;
14};
15
16describe('isSelectionInMarkdownLink', () => {
17 test('should return true when selection is inside markdown link text', () => {

Callers 1

markdown.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected