Skip to content

Commit 0173f06

Browse files
committed
fix: correct mock mode configuration in browser capability test
The test was using an incorrect group format { id: 'browser' } instead of the correct string format 'browser'. Also updated the mock API path to match other tests in the same directory and changed label to name to match the ModeConfig interface.
1 parent ac22924 commit 0173f06

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/core/webview/__tests__/generateSystemPrompt.browser-capability.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vi.mock("../../prompts/system", () => ({
1212
}))
1313

1414
// Mock API handler so we control model.info flags
15-
vi.mock("../../api", () => ({
15+
vi.mock("../../../api", () => ({
1616
buildApiHandler: vi.fn((_config) => ({
1717
getModel: () => ({
1818
id: "mock-model",
@@ -33,9 +33,10 @@ vi.mock("../../api", () => ({
3333
const mockCustomModes = [
3434
{
3535
slug: "test-mode",
36-
label: "Test Mode",
36+
name: "Test Mode",
37+
roleDefinition: "Test role",
3738
description: "",
38-
groups: [{ id: "browser" }], // critical: include browser group
39+
groups: ["browser"], // critical: include browser group
3940
},
4041
]
4142

0 commit comments

Comments
 (0)