MCPcopy Create free account
hub / github.com/continuedev/continue / createMockSyntaxNode

Function createMockSyntaxNode

core/edit/lazy/findInAst.test.ts:95–109  ·  view source on GitHub ↗
(
  type: string,
  children: Parser.SyntaxNode[],
)

Source from the content-addressed store, hash-verified

93});
94
95function createMockSyntaxNode(
96 type: string,
97 children: Parser.SyntaxNode[],
98): Parser.SyntaxNode {
99 // Define minimal properties of SyntaxNode required for the test
100 const node: Partial<Parser.SyntaxNode> = {
101 type,
102 children,
103 childCount: children.length,
104 child: (index: number) => {
105 return children[index] || null;
106 },
107 };
108 return node as Parser.SyntaxNode;
109}

Callers 1

findInAst.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected