fix: add deduplicateReadFileHistory mock to readFileTool tests

The tests were failing because the mock cline object was missing the
deduplicateReadFileHistory method that is now called in readFileTool.ts
after successful file reads.
This commit is contained in:
Roo Code 2025-07-21 20:43:30 +00:00
parent b9a378c72a
commit 31d32d5993

View file

@ -126,6 +126,7 @@ describe("read_file tool with maxReadFileLine setting", () => {
mockCline.recordToolUsage = vi.fn().mockReturnValue(undefined)
mockCline.recordToolError = vi.fn().mockReturnValue(undefined)
mockCline.deduplicateReadFileHistory = vi.fn().mockReturnValue(undefined)
toolResult = undefined
})
@ -381,6 +382,7 @@ describe("read_file tool XML output structure", () => {
mockCline.recordToolUsage = vi.fn().mockReturnValue(undefined)
mockCline.recordToolError = vi.fn().mockReturnValue(undefined)
mockCline.deduplicateReadFileHistory = vi.fn().mockReturnValue(undefined)
mockCline.didRejectTool = false
toolResult = undefined