feat(performance): investment performance vs Moscow Exchange index (WealthLedger/main#54) (#200)
This commit was merged in pull request #200.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { isCompleteValuation } from './complete-valuation';
|
||||
|
||||
describe('isCompleteValuation', () => {
|
||||
it('requires an actual currency total and every position value', () => {
|
||||
expect(isCompleteValuation({ totalsByCurrency: [], positions: [] })).toBe(false);
|
||||
expect(isCompleteValuation({
|
||||
totalsByCurrency: [{ currency: 'RUB', value: '100' }],
|
||||
positions: [{ currentValue: null }],
|
||||
})).toBe(false);
|
||||
expect(isCompleteValuation({
|
||||
totalsByCurrency: [{ currency: 'RUB', value: '100' }],
|
||||
positions: [{ currentValue: { currency: 'RUB', value: '0' } }],
|
||||
})).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user