Skip to content

Commit d2bb0c4

Browse files
fix: add missing getCostSummary/getCostByModel to a11y test mock
Same fix as #3281 — the a11y-pages test mock is missing the new API client exports, causing Node 20 CI failure.
1 parent 00c8be1 commit d2bb0c4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

dashboard/src/__tests__/a11y-pages.test.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,18 @@ vi.mock('../api/client', () => ({
165165
],
166166
generatedAt: new Date().toISOString(),
167167
}),
168+
getCostSummary: vi.fn().mockResolvedValue({
169+
from: null, to: null,
170+
totalInputTokens: 3000, totalOutputTokens: 1500,
171+
totalCacheCreationTokens: 600, totalCacheReadTokens: 2400,
172+
cacheHitRate: 0.8, estimatedCostUsd: 12.34,
173+
burnRateUsdPerHour: 1.5, sessions: 5,
174+
}),
175+
getCostByModel: vi.fn().mockResolvedValue({
176+
from: null, to: null,
177+
models: [{ model: 'claude-sonnet-4-20250514', inputTokens: 3000, outputTokens: 1500, cacheCreationTokens: 600, cacheReadTokens: 2400, estimatedCostUsd: 12.34, cacheHitRate: 0.8 }],
178+
totalModels: 1, totalCostUsd: 12.34,
179+
}),
168180
checkForUpdates: vi.fn().mockResolvedValue({
169181
currentVersion: '1.0.0',
170182
latestVersion: '1.0.0',

0 commit comments

Comments
 (0)