17 lines
647 B
TypeScript
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');
|
|
});
|
|
});
|