MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / expectConsistent

Function expectConsistent

__tests__/telemetry-services.test.ts:378–390  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

376 }
377
378 function expectConsistent(): void {
379 for (const day of MISSED) {
380 const l = ledger(day);
381 // Nothing lost and nothing counted twice, however far the fold got.
382 expect(l.folded + l.unfolded, day).toBe(LEGACY_ROWS[day]);
383 if (l.rolledUp) {
384 expect(l, day).toMatchObject({ unfolded: 0, rolledUsage: LEGACY_ROWS[day] });
385 } else {
386 // A day whose fold did not finish gets no rollup at all, so it stays "missed".
387 expect(l.rolledUsage, day).toBeNull();
388 }
389 }
390 }
391
392 beforeEach(() => {
393 for (const day of MISSED) seedLegacyDay(day, LEGACY_ROWS[day]!);

Callers 1

Calls 1

ledgerFunction · 0.85

Tested by

no test coverage detected