From 7d781bd61520bf3db1ff03fb80ef6e713cef175b Mon Sep 17 00:00:00 2001 From: hitesh-1997 Date: Wed, 18 Dec 2024 22:09:35 +0530 Subject: [PATCH] repro issue because of partial suffix match with predictions --- vscode/src/autoedits/shrink-prediction.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vscode/src/autoedits/shrink-prediction.test.ts b/vscode/src/autoedits/shrink-prediction.test.ts index bba168767082..a4be712a77a6 100644 --- a/vscode/src/autoedits/shrink-prediction.test.ts +++ b/vscode/src/autoedits/shrink-prediction.test.ts @@ -24,6 +24,11 @@ describe('shrinkPredictionUntilSuffix', () => { + + + + + // some code ` @@ -33,7 +38,7 @@ describe('shrinkPredictionUntilSuffix', () => { pred_line_2 ` - const wrongExpectedResult = "constructor(recentEditsTracker: RecentEditsTracker) {\n this.recentEditsTracker = recentEditsTracker\n" + const wrongExpectedResult = "constructor(recentEditsTracker: RecentEditsTracker) {\n" const result = shrinkPredictionUntilSuffix(prediction, codeToReplaceData) expect(result).toBe(wrongExpectedResult)