Skip to content

Commit ce34d48

Browse files
committed
test(task): document double assertion in abandoned-guard test
Per CodeRabbit review: document why the provider test double uses the as unknown as MockedClineProvider double assertion (Task receives a full ClineProvider at runtime; this focused unit test only exercises a few methods) — same pattern and rationale as the existing Subtask Rate Limiting block.
1 parent 352df16 commit ce34d48

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/core/task/__tests__/Task.spec.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4347,6 +4347,9 @@ describe("saveClineMessages abandoned guard (#1021)", () => {
43474347
getMcpHub: vi.fn().mockReturnValue(undefined),
43484348
postMessageToWebview: vi.fn().mockResolvedValue(undefined),
43494349
updateTaskHistory: vi.fn().mockResolvedValue(undefined),
4350+
// Task receives a full ClineProvider at runtime; this focused unit test only
4351+
// exercises these methods, so the partial double is cast (same pattern as the
4352+
// "Subtask Rate Limiting" block above).
43504353
} as unknown as MockedClineProvider
43514354

43524355
const task = new Task({

0 commit comments

Comments
 (0)