Skip to content

Commit 097dbd3

Browse files
committed
fix: Add missing workspace mock to registerCommands test
- Add workspace.workspaceFolders mock to VSCode mock in registerCommands.spec.ts - Fixes test failure where claude-code modules access vscode.workspace at module level - Resolves 'No workspace export is defined on the vscode mock' error
1 parent b1b2cdc commit 097dbd3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/activate/__tests__/registerCommands.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ vi.mock("vscode", () => ({
1616
window: {
1717
createTextEditorDecorationType: vi.fn().mockReturnValue({ dispose: vi.fn() }),
1818
},
19+
workspace: {
20+
workspaceFolders: [
21+
{
22+
uri: {
23+
fsPath: "/mock/workspace",
24+
},
25+
},
26+
],
27+
},
1928
}))
2029

2130
vi.mock("../../core/webview/ClineProvider")

0 commit comments

Comments
 (0)