Skip to content

Commit fa48935

Browse files
author
Zoo (VP)
committed
test(stats): add childrenByParentId to task-page handler catalog mocks
The root-only task page reads childrenByParentId for childTasks; the handler/routing specs' catalog stubs predated that index.
1 parent c4afe5a commit fa48935

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/core/webview/__tests__/usageStatsMessageHandler.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,7 @@ describe("usageStatsMessageHandler", () => {
17751775
catalogRevision: 7,
17761776
getPage: vi.fn(() => ({ tasks: ["history-task"], cursor: "next", totalEstimate: 1 })),
17771777
getDescendantTaskIds: vi.fn(() => []),
1778+
childrenByParentId: new Map(),
17781779
byId: new Map([["history-task", { id: "history-task", task: "History task", ts: 321 }]]),
17791780
ancestorsByTaskId: new Map(),
17801781
}
@@ -1808,6 +1809,7 @@ describe("usageStatsMessageHandler", () => {
18081809
catalogRevision: 7,
18091810
getPage: vi.fn(() => ({ tasks: [], cursor: undefined, totalEstimate: 0 })),
18101811
getDescendantTaskIds: vi.fn(() => []),
1812+
childrenByParentId: new Map(),
18111813
byId: new Map(),
18121814
ancestorsByTaskId: new Map(),
18131815
}

src/core/webview/__tests__/usageStatsMessageRouting.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ describe("usageStatsMessageRouting", () => {
426426
catalogRevision: 2,
427427
getPage: vi.fn(() => ({ tasks: ["task-001"], cursor: undefined, totalEstimate: 1 })),
428428
getDescendantTaskIds: vi.fn(() => []),
429+
childrenByParentId: new Map(),
429430
byId: new Map([["task-001", { id: "task-001", task: "History task", ts: 100 }]]),
430431
ancestorsByTaskId: new Map(),
431432
}

0 commit comments

Comments
 (0)