Skip to content

Commit c326dad

Browse files
committed
test: provide getStorageBasePath in the ClineProvider.spec storage mock
TaskHistoryStore deletion now resolves the tasks directory before it removes a history file, so the storage mock must supply the getStorageBasePath passthrough. Without it, a deletion inside the file-backed history tests throws from the mock instead of exercising the real path.
1 parent b68cb8f commit c326dad

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/core/webview/__tests__/ClineProvider.spec.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ vi.mock("../../../utils/storage", () => ({
8787
getSettingsDirectoryPath: vi.fn().mockResolvedValue("/test/settings/path"),
8888
getTaskDirectoryPath: vi.fn().mockResolvedValue("/test/task/path"),
8989
getGlobalStoragePath: vi.fn().mockResolvedValue("/test/storage/path"),
90+
// Deletion resolves the tasks directory before it removes a history
91+
// file, so the harness must provide the passthrough base path.
92+
getStorageBasePath: vi.fn().mockImplementation((defaultPath: string) => defaultPath),
9093
}))
9194

9295
vi.mock("@modelcontextprotocol/sdk/types.js", () => ({

0 commit comments

Comments
 (0)