|
|
@ -62,6 +62,8 @@ describe('PortfolioCalculator', () => { |
|
|
|
parseDate('2022-03-07') |
|
|
|
); |
|
|
|
|
|
|
|
const investmentsByMonth = portfolioCalculator.getInvestmentsByMonth(); |
|
|
|
|
|
|
|
spy.mockRestore(); |
|
|
|
|
|
|
|
expect(currentPositions).toEqual({ |
|
|
@ -91,6 +93,11 @@ describe('PortfolioCalculator', () => { |
|
|
|
], |
|
|
|
totalInvestment: new Big('75.80') |
|
|
|
}); |
|
|
|
|
|
|
|
expect(investmentsByMonth).toEqual([ |
|
|
|
{ date: '2022-03-01', investment: new Big('151.6') }, |
|
|
|
{ date: '2022-04-01', investment: new Big('-85.73') } |
|
|
|
]); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|