Skip to content

Commit b53c7dd

Browse files
committed
fix (seemingly unrelatd) test failure in writeToFileTool.test.ts
1 parent b165fc7 commit b53c7dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/tools/__tests__/writeToFileTool.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,14 @@ describe("writeToFileTool", () => {
343343
})
344344

345345
it("reports user edits with diff feedback", async () => {
346+
const userEditsValue = "- old line\n+ new line"
346347
mockCline.diffViewProvider.saveChanges.mockResolvedValue({
347348
newProblemsMessage: " with warnings",
348-
userEdits: "- old line\n+ new line",
349+
userEdits: userEditsValue,
349350
finalContent: "modified content",
350351
})
352+
// Manually set the property on the mock instance because the original saveChanges is not called
353+
mockCline.diffViewProvider.userEdits = userEditsValue
351354

352355
await executeWriteFileTool({}, { fileExists: true })
353356

0 commit comments

Comments
 (0)