Skip to content

Commit 3a2e69e

Browse files
fix: add missing getCostSummary/getCostByModel to a11y test mock (#3281)
The dashboard a11y-pages test mocks the API client but was missing the new getCostSummary and getCostByModel exports added by this PR. This caused Node 20 CI failure with: No 'getCostSummary' export is defined on the '../api/client' mock
1 parent 4f90817 commit 3a2e69e

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)