mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
test: update insertContentTool spec to accept i18n error key
This commit is contained in:
parent
b446b1d986
commit
df697c0b9c
1 changed files with 7 additions and 1 deletions
|
|
@ -226,7 +226,13 @@ describe("insertContentTool", () => {
|
|||
expect(mockedFsReadFile).not.toHaveBeenCalled()
|
||||
expect(mockCline.consecutiveMistakeCount).toBe(1)
|
||||
expect(mockCline.recordToolError).toHaveBeenCalledWith("insert_content")
|
||||
expect(mockCline.say).toHaveBeenCalledWith("error", expect.stringContaining("non-existent file"))
|
||||
// Accept both legacy hardcoded text and new i18n key-based message
|
||||
expect(mockCline.say).toHaveBeenCalledWith(
|
||||
"error",
|
||||
expect.stringMatching(
|
||||
/non-existent file|errors\.insertContentNewFile|tools:errors\.insertContentNewFile/,
|
||||
),
|
||||
)
|
||||
expect(mockCline.diffViewProvider.update).not.toHaveBeenCalled()
|
||||
expect(mockCline.diffViewProvider.pushToolWriteResult).not.toHaveBeenCalled()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue