mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
test(cli): update tests to match refactored output format
- Update extension-host tests to expect [Tool Request] format - Update Icon tests to expect single-char Nerd Font icons
This commit is contained in:
parent
8d3a6acb72
commit
86ca7e4351
2 changed files with 7 additions and 7 deletions
|
|
@ -569,7 +569,7 @@ describe("ExtensionHost", () => {
|
|||
|
||||
callPrivate(host, "handleAskMessage", 123, "tool", toolInfo, false)
|
||||
|
||||
expect(outputSpy).toHaveBeenCalledWith("\n[tool] write_file")
|
||||
expect(outputSpy).toHaveBeenCalledWith("\n[Tool Request] write_file")
|
||||
expect(outputSpy).toHaveBeenCalledWith(" path: /test/file.txt")
|
||||
})
|
||||
|
||||
|
|
@ -582,7 +582,7 @@ describe("ExtensionHost", () => {
|
|||
callPrivate(host, "handleAskMessage", 123, "tool", toolInfo, false)
|
||||
|
||||
// Content is now shown (all tool parameters are displayed)
|
||||
expect(outputSpy).toHaveBeenCalledWith("\n[tool] write_file")
|
||||
expect(outputSpy).toHaveBeenCalledWith("\n[Tool Request] write_file")
|
||||
expect(outputSpy).toHaveBeenCalledWith(
|
||||
" content: This is the content that will be written to the file. It might be long.",
|
||||
)
|
||||
|
|
@ -591,7 +591,7 @@ describe("ExtensionHost", () => {
|
|||
it("should handle tool type with invalid JSON in non-interactive mode", () => {
|
||||
callPrivate(host, "handleAskMessage", 123, "tool", "not json", false)
|
||||
|
||||
expect(outputSpy).toHaveBeenCalledWith("\n[tool]", "not json")
|
||||
expect(outputSpy).toHaveBeenCalledWith("\n[Tool Request] unknown")
|
||||
})
|
||||
|
||||
it("should not display duplicate messages for same ts", () => {
|
||||
|
|
|
|||
|
|
@ -135,9 +135,9 @@ describe("Icon", () => {
|
|||
process.env.ROOCODE_NERD_FONT = "1"
|
||||
resetNerdFontCache()
|
||||
|
||||
// Nerd Font icons are surrogate pairs (length 2)
|
||||
expect(getIconChar("folder").length).toBe(2)
|
||||
expect(getIconChar("file").length).toBe(2)
|
||||
// Nerd Font icons are single characters (length 1)
|
||||
expect(getIconChar("folder").length).toBe(1)
|
||||
expect(getIconChar("file").length).toBe(1)
|
||||
})
|
||||
|
||||
it("should respect useNerdFont override", () => {
|
||||
|
|
@ -151,7 +151,7 @@ describe("Icon", () => {
|
|||
resetNerdFontCache()
|
||||
|
||||
// Force Nerd Font
|
||||
expect(getIconChar("folder", true).length).toBe(2)
|
||||
expect(getIconChar("folder", true).length).toBe(1)
|
||||
})
|
||||
|
||||
it("should return empty string for unknown icon", () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue