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.
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import { isCompleteValuation } from './complete-valuation';
|
||||
|
||||
describe('isCompleteValuation', () => {
|
||||
it('requires an actual currency total and every position value', () => {
|
||||
expect(isCompleteValuation({ totalsByCurrency: [], positions: [] })).toBe(false);
|
||||
it('requires an actual total and every position value', () => {
|
||||
expect(isCompleteValuation({
|
||||
totalsByCurrency: [{ currency: 'RUB', value: '100' }],
|
||||
totals: { value: '100' },
|
||||
positions: [{ currentValue: null }],
|
||||
})).toBe(false);
|
||||
expect(isCompleteValuation({
|
||||
totalsByCurrency: [{ currency: 'RUB', value: '100' }],
|
||||
totals: { value: '100' },
|
||||
positions: [{ currentValue: { currency: 'RUB', value: '0' } }],
|
||||
})).toBe(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user