mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix: update searchAndReplaceTool tests to match implementation
- Remove expectation for recordToolUsage call (metrics are recorded by presentAssistantMessage) - Fix handleError assertion to use 'edit_file_anthropic' instead of 'search and replace'
This commit is contained in:
parent
448f7691d4
commit
d2f5dfd24c
1 changed files with 2 additions and 2 deletions
|
|
@ -331,7 +331,7 @@ describe("searchAndReplaceTool", () => {
|
|||
|
||||
expect(mockTask.diffViewProvider.saveChanges).toHaveBeenCalled()
|
||||
expect(mockTask.didEditFile).toBe(true)
|
||||
expect(mockTask.recordToolUsage).toHaveBeenCalledWith("edit_file_anthropic")
|
||||
// Tool usage metrics are recorded by presentAssistantMessage(), not in the tool itself
|
||||
})
|
||||
|
||||
it("reverts changes when user rejects", async () => {
|
||||
|
|
@ -390,7 +390,7 @@ describe("searchAndReplaceTool", () => {
|
|||
|
||||
await executeSearchAndReplaceTool()
|
||||
|
||||
expect(mockHandleError).toHaveBeenCalledWith("search and replace", expect.any(Error))
|
||||
expect(mockHandleError).toHaveBeenCalledWith("edit_file_anthropic", expect.any(Error))
|
||||
expect(mockTask.diffViewProvider.reset).toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue