Files
backend/src/modules/investments/portfolio/domain/complete-valuation.spec.ts
T
ksv741 3b55b611b5 refactor!: support RUB only (WealthLedger/main#55)
Filter non-RUB data at ingest, collapse per-currency collections into single RUB Money, drop currency from TbankPortfolioValuePoint, remove NON_RUB_ACTIVITY and screener currency filter.

BREAKING CHANGE: per-currency API fields replaced with single RUB Money; stock screener currency param removed.
2026-11-11 08:22:16 +03:00

15 lines
461 B
TypeScript

import { isCompleteValuation } from './complete-valuation';
describe('isCompleteValuation', () => {
it('requires an actual total and every position value', () => {
expect(isCompleteValuation({
totals: { value: '100' },
positions: [{ currentValue: null }],
})).toBe(false);
expect(isCompleteValuation({
totals: { value: '100' },
positions: [{ currentValue: { currency: 'RUB', value: '0' } }],
})).toBe(true);
});
});