diff --git a/core/autocomplete/context/root-path-context/RootPathContextService.test.ts b/core/autocomplete/context/root-path-context/RootPathContextService.test.ts index 87795611b..ccce0b6ac 100644 --- a/core/autocomplete/context/root-path-context/RootPathContextService.test.ts +++ b/core/autocomplete/context/root-path-context/RootPathContextService.test.ts @@ -74,7 +74,7 @@ export async function testRootPathContext( throw new Error("AST is undefined"); } - const treePath = await getTreePathAtCursor(ast, rangeToFill.start.character); + const treePath = await getTreePathAtCursor(ast, prefix.length); const snippets = await service.getContextForPath(startPath, treePath); expectedSnippets.forEach((expectedSnippet) => {