Skip to content

Commit 6c33756

Browse files
committed
test: fix remaining test mocks and update snapshots
1 parent b973205 commit 6c33756

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/ask-mode-prompt.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/tools/__tests__/applyDiffTool.experiment.spec.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,19 @@ describe("applyDiffTool experiment routing", () => {
5353
diffViewProvider: {
5454
reset: vi.fn(),
5555
},
56+
apiConfiguration: {
57+
apiProvider: "anthropic",
58+
},
5659
api: {
57-
getModel: vi.fn().mockReturnValue({ id: "test-model" }),
60+
getModel: vi.fn().mockReturnValue({
61+
id: "test-model",
62+
info: {
63+
maxTokens: 4096,
64+
contextWindow: 128000,
65+
supportsPromptCache: false,
66+
supportsNativeTools: false,
67+
},
68+
}),
5869
},
5970
processQueuedMessages: vi.fn(),
6071
} as any
@@ -151,6 +162,17 @@ describe("applyDiffTool experiment routing", () => {
151162
get: vi.fn().mockReturnValue(TOOL_PROTOCOL.NATIVE),
152163
} as any)
153164

165+
// Update model to support native tools
166+
mockCline.api.getModel = vi.fn().mockReturnValue({
167+
id: "test-model",
168+
info: {
169+
maxTokens: 4096,
170+
contextWindow: 128000,
171+
supportsPromptCache: false,
172+
supportsNativeTools: true, // Enable native tools support
173+
},
174+
})
175+
154176
mockProvider.getState.mockResolvedValue({
155177
experiments: {
156178
[EXPERIMENT_IDS.MULTI_FILE_APPLY_DIFF]: true,

0 commit comments

Comments
 (0)