// @ts-nocheck import { describe, expect, it } from 'vitest'; import { sparkFirstLast } from './dashboardMetrics'; describe('ProjectsPage sparkline data wiring (real render uses sparkFirstLast over run list)', () => { it('the runs list with project_id + result feeds per-project endpoints', () => { const runs = [ { project_id: 'pA', created_at: '2026-01-05', result: { equity: [{ equity: 100 }, { equity: 110 }] } }, { project_id: 'pB', created_at: null, result: null } ]; const m = sparkFirstLast(runs); expect([...m.keys()]).toEqual(['pA']); expect(m.get('pA')).toEqual({ first: 100, last: 110 }); }); });