From 30363b0b23c9b035735a3d1d23c578a16d75dc63 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Sat, 6 Dec 2025 04:10:31 +0000 Subject: [PATCH] fix: add getMcpHub mock to Subtask Rate Limiting tests The addition of defaultToolProtocol: "native" to model definitions now triggers the buildNativeToolsArray code path which requires provider.getMcpHub() to be defined. Added the missing mock method. --- src/core/task/__tests__/Task.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/task/__tests__/Task.spec.ts b/src/core/task/__tests__/Task.spec.ts index 4bae9c49d0..3caf3f7c42 100644 --- a/src/core/task/__tests__/Task.spec.ts +++ b/src/core/task/__tests__/Task.spec.ts @@ -981,6 +981,7 @@ describe("Cline", () => { getState: vi.fn().mockResolvedValue({ apiConfiguration: mockApiConfig, }), + getMcpHub: vi.fn().mockReturnValue(undefined), say: vi.fn(), postStateToWebview: vi.fn().mockResolvedValue(undefined), postMessageToWebview: vi.fn().mockResolvedValue(undefined),