feat(performance): investment performance vs Moscow Exchange index (WealthLedger/main#54) (#200)
Backend verify / commits (push) Skipped
Backend verify / security (push) Successful in 1m7s
Backend verify / verify (push) Failing after 7m19s

This commit was merged in pull request #200.
This commit is contained in:
2026-11-08 16:45:29 +03:00
parent 84433ee207
commit fee61537b6
28 changed files with 1507 additions and 4 deletions
@@ -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);
});
});