Files
backend/src/modules/investments/investment-sync-plan.spec.ts
T
codex-bot 5e84e1e5f1
Backend verify / commits (push) Skipped
Backend verify / security (push) Successful in 17s
Backend verify / verify (push) Failing after 5m52s
fix: scope income and ledger sync to requested intervals (WealthLedger/backend#57) (#147)
2026-10-28 21:29:53 +03:00

17 lines
647 B
TypeScript

import { accountHistory, ledgerRange } from './investment-sync-plan';
// Missing opening dates must not silently narrow the reported history boundary.
describe('account history boundaries', () => {
const now = new Date('2026-09-25T12:00:00Z');
const accounts = [{ accountId: 'a', openedOn: null }];
it('retains the unknown opening boundary for history and instrument ledger', () => {
expect(accountHistory(accounts, now)[0].from.toISOString()).toBe(
'1970-01-01T00:00:00.000Z',
);
expect(
ledgerRange(undefined, undefined, 'uid', accounts, now).from.toISOString(),
).toBe('1970-01-01T00:00:00.000Z');
});
});