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

Function expectConsistent

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

Source from the content-addressed store, hash-verified

412 }
413
414 function expectConsistent(): void {
415 for (const day of MISSED) {
416 const l = ledger(day);
417 // Nothing lost and nothing counted twice, however far the fold got.
418 expect(l.folded + l.unfolded, day).toBe(LEGACY_ROWS[day]);
419 if (l.rolledUp) {
420 expect(l, day).toMatchObject({ unfolded: 0, rolledUsage: LEGACY_ROWS[day] });
421 } else {
422 // A day whose fold did not finish gets no rollup at all, so it stays "missed".
423 expect(l.rolledUsage, day).toBeNull();
424 }
425 }
426 }
427
428 beforeEach(() => {
429 for (const day of MISSED) seedLegacyDay(day, LEGACY_ROWS[day]!);

Callers 1

Calls 1

ledgerFunction · 0.85

Tested by

no test coverage detected