mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: Update FileWatcher tests to work with new RooIgnoreController interface
- Fixed FileWatcher test constructor to match new signature (removed ignore instance parameter) - Added proper mocking for RooIgnoreController.initialize() method - Enhanced ignore module mock to provide required add() and ignores() methods - All code-index tests now pass (341/341)
This commit is contained in:
parent
df040a1d0e
commit
36ff031d72
1 changed files with 8 additions and 9 deletions
|
|
@ -18,9 +18,15 @@ vi.mock("../../cache-manager")
|
|||
vi.mock("../../../core/ignore/RooIgnoreController", () => ({
|
||||
RooIgnoreController: vi.fn().mockImplementation(() => ({
|
||||
validateAccess: vi.fn().mockReturnValue(true),
|
||||
initialize: vi.fn().mockResolvedValue(undefined),
|
||||
})),
|
||||
}))
|
||||
vi.mock("ignore", () => ({
|
||||
default: vi.fn(() => ({
|
||||
add: vi.fn(),
|
||||
ignores: vi.fn().mockReturnValue(false),
|
||||
})),
|
||||
}))
|
||||
vi.mock("ignore")
|
||||
vi.mock("../parser", () => ({
|
||||
codeParser: {
|
||||
parseFile: vi.fn().mockResolvedValue([]),
|
||||
|
|
@ -124,14 +130,7 @@ describe("FileWatcher", () => {
|
|||
ignores: vi.fn().mockReturnValue(false),
|
||||
}
|
||||
|
||||
fileWatcher = new FileWatcher(
|
||||
"/mock/workspace",
|
||||
mockContext,
|
||||
mockCacheManager,
|
||||
mockEmbedder,
|
||||
mockVectorStore,
|
||||
mockIgnoreInstance,
|
||||
)
|
||||
fileWatcher = new FileWatcher("/mock/workspace", mockContext, mockCacheManager, mockEmbedder, mockVectorStore)
|
||||
})
|
||||
|
||||
describe("file filtering", () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue