Skip to content

Commit 55c585e

Browse files
author
Eric Wheeler
committed
test: inspectTreeStructure helper now returns a string
Signed-off-by: Eric Wheeler <[email protected]>
1 parent 13caf8d commit 55c585e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/tree-sitter/__tests__/helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export async function testParseSourceCodeDefinitions(
119119
}
120120

121121
// Helper function to inspect tree structure
122-
export async function inspectTreeStructure(content: string, language: string = "typescript"): Promise<void> {
122+
export async function inspectTreeStructure(content: string, language: string = "typescript"): Promise<string> {
123123
const TreeSitter = await initializeTreeSitter()
124124
const parser = new TreeSitter()
125125
const wasmPath = path.join(process.cwd(), `dist/tree-sitter-${language}.wasm`)
@@ -131,4 +131,5 @@ export async function inspectTreeStructure(content: string, language: string = "
131131

132132
// Print the tree structure
133133
debugLog(`TREE STRUCTURE (${language}):\n${tree.rootNode.toString()}`)
134+
return tree.rootNode.toString()
134135
}

0 commit comments

Comments
 (0)