Browse Source

Fix tests

pull/3393/head
Reto Kaul 1 year ago
parent
commit
098ad2419f
  1. 2
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts
  2. 2
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-baln-buy.spec.ts
  3. 2
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-novn-buy-and-sell-partially.spec.ts
  4. 4
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-novn-buy-and-sell.spec.ts

2
apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts

@ -171,7 +171,7 @@ describe('PortfolioCalculator', () => {
netPerformance: new Big('-15.8'), netPerformance: new Big('-15.8'),
netPerformancePercentage: new Big('-0.05528341497550734703'), netPerformancePercentage: new Big('-0.05528341497550734703'),
netPerformancePercentageWithCurrencyEffect: new Big( netPerformancePercentageWithCurrencyEffect: new Big(
'-0.05528341497550734703' '-0.0552834149755073478'
), ),
netPerformancePercentageWithCurrencyEffectMap: { netPerformancePercentageWithCurrencyEffectMap: {
max: new Big('-0.0552834149755073478') max: new Big('-0.0552834149755073478')

2
apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-baln-buy.spec.ts

@ -178,7 +178,7 @@ describe('PortfolioCalculator', () => {
expect(last(portfolioSnapshot.historicalData)).toMatchObject( expect(last(portfolioSnapshot.historicalData)).toMatchObject(
expect.objectContaining({ expect.objectContaining({
netPerformanceInPercentageWithCurrencyEffect: 8.437042459736457, netPerformanceInPercentageWithCurrencyEffect: 0.08437042459736457,
netPerformanceWithCurrencyEffect: 23.05, netPerformanceWithCurrencyEffect: 23.05,
totalInvestmentValueWithCurrencyEffect: 273.2 totalInvestmentValueWithCurrencyEffect: 273.2
}) })

2
apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-novn-buy-and-sell-partially.spec.ts

@ -156,7 +156,7 @@ describe('PortfolioCalculator', () => {
netPerformance: new Big('17.68'), netPerformance: new Big('17.68'),
netPerformancePercentage: new Big('0.12184460284330327256'), netPerformancePercentage: new Big('0.12184460284330327256'),
netPerformancePercentageWithCurrencyEffect: new Big( netPerformancePercentageWithCurrencyEffect: new Big(
'0.12184460284330327256' '0.12348284960422163588'
), ),
netPerformancePercentageWithCurrencyEffectMap: { netPerformancePercentageWithCurrencyEffectMap: {
max: new Big('0.12348284960422163588') max: new Big('0.12348284960422163588')

4
apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-novn-buy-and-sell.spec.ts

@ -157,8 +157,8 @@ describe('PortfolioCalculator', () => {
date: '2022-04-11', date: '2022-04-11',
investmentValueWithCurrencyEffect: 0, investmentValueWithCurrencyEffect: 0,
netPerformance: 19.86, netPerformance: 19.86,
netPerformanceInPercentage: 13.100263852242744, netPerformanceInPercentage: 0.13100263852242744,
netPerformanceInPercentageWithCurrencyEffect: 13.100263852242744, netPerformanceInPercentageWithCurrencyEffect: 0.13100263852242744,
netPerformanceWithCurrencyEffect: 19.86, netPerformanceWithCurrencyEffect: 19.86,
netWorth: 0, netWorth: 0,
totalAccountBalance: 0, totalAccountBalance: 0,

Loading…
Cancel
Save