mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
Fix unit test for updated openFile function signature
- Updated test expectation to match new preserveFocus parameter - Added ClineProvider mock for automated workflow detection - All mentions tests now pass 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
91158c07be
commit
10967936f9
1 changed files with 12 additions and 1 deletions
|
|
@ -99,6 +99,17 @@ jest.mock("../../../integrations/misc/open-file", () => ({
|
|||
}))
|
||||
import { openFile } from "../../../integrations/misc/open-file"
|
||||
|
||||
jest.mock("../../webview/ClineProvider", () => ({
|
||||
ClineProvider: {
|
||||
getVisibleInstance: jest.fn().mockReturnValue({
|
||||
getCurrentCline: jest.fn().mockReturnValue(null),
|
||||
contextProxy: {
|
||||
getValue: jest.fn().mockReturnValue(false),
|
||||
},
|
||||
}),
|
||||
},
|
||||
}))
|
||||
|
||||
jest.mock("../../../integrations/misc/extract-text", () => ({
|
||||
extractTextFromFile: jest.fn(),
|
||||
}))
|
||||
|
|
@ -256,7 +267,7 @@ Detailed commit message with multiple lines
|
|||
|
||||
await openMention(mention)
|
||||
|
||||
expect(openFile).toHaveBeenCalledWith(expectedAbsPath)
|
||||
expect(openFile).toHaveBeenCalledWith(expectedAbsPath, { preserveFocus: false })
|
||||
expect(vscode.commands.executeCommand).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue