From 8a53d42a5bd318659c652307888a864a1d08ac5c Mon Sep 17 00:00:00 2001 From: Daniel Devaud Date: Wed, 3 Jan 2024 18:36:53 +0100 Subject: [PATCH] Test fixes --- .../portfolio-calculator-baln-buy-and-sell.spec.ts | 2 +- .../portfolio/portfolio-calculator-baln-buy.spec.ts | 2 +- ...io-calculator-btcusd-buy-and-sell-partially.spec.ts | 10 +++++----- ...olio-calculator-novn-buy-and-sell-partially.spec.ts | 10 +++++----- .../portfolio-calculator-novn-buy-and-sell.spec.ts | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/api/src/app/portfolio/portfolio-calculator-baln-buy-and-sell.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-baln-buy-and-sell.spec.ts index f4fec026a..0bf8da70b 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-baln-buy-and-sell.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-baln-buy-and-sell.spec.ts @@ -92,7 +92,7 @@ describe('PortfolioCalculator', () => { marketPrice: 148.9, quantity: new Big('0'), symbol: 'BALN.SW', - timeWeightedInvestment: new Big('285.8'), + tags: undefined, transactionCount: 2 } ], diff --git a/apps/api/src/app/portfolio/portfolio-calculator-baln-buy.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-baln-buy.spec.ts index e2560cfbb..62cc01b2a 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-baln-buy.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-baln-buy.spec.ts @@ -81,7 +81,7 @@ describe('PortfolioCalculator', () => { marketPrice: 148.9, quantity: new Big('2'), symbol: 'BALN.SW', - timeWeightedInvestment: new Big('273.2'), + tags: undefined, transactionCount: 1 } ], diff --git a/apps/api/src/app/portfolio/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts index 4f1bc8cdc..cf0b7bfb9 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts @@ -73,10 +73,10 @@ describe('PortfolioCalculator', () => { currentValue: new Big('13657.2'), errors: [], grossPerformance: new Big('27172.74'), - grossPerformancePercentage: new Big('42.41978276196153750666'), + grossPerformancePercentage: new Big('42.40043067128546016291'), hasErrors: false, netPerformance: new Big('27172.74'), - netPerformancePercentage: new Big('42.41978276196153750666'), + netPerformancePercentage: new Big('42.40043067128546016291'), positions: [ { averagePrice: new Big('320.43'), @@ -85,14 +85,14 @@ describe('PortfolioCalculator', () => { fee: new Big('0'), firstBuyDate: '2015-01-01', grossPerformance: new Big('27172.74'), - grossPerformancePercentage: new Big('42.41978276196153750666'), + grossPerformancePercentage: new Big('42.40043067128546016291'), investment: new Big('320.43'), netPerformance: new Big('27172.74'), - netPerformancePercentage: new Big('42.41978276196153750666'), + netPerformancePercentage: new Big('42.40043067128546016291'), marketPrice: 13657.2, quantity: new Big('1'), symbol: 'BTCUSD', - timeWeightedInvestment: new Big('640.56763686131386861314'), + tags: undefined, transactionCount: 2 } ], diff --git a/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell-partially.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell-partially.spec.ts index 2c8bff238..2d42d8528 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell-partially.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell-partially.spec.ts @@ -73,10 +73,10 @@ describe('PortfolioCalculator', () => { currentValue: new Big('87.8'), errors: [], grossPerformance: new Big('21.93'), - grossPerformancePercentage: new Big('0.15113417083448194384'), + grossPerformancePercentage: new Big('0.14465699208443271768'), hasErrors: false, netPerformance: new Big('17.68'), - netPerformancePercentage: new Big('0.12184460284330327256'), + netPerformancePercentage: new Big('0.11662269129287598945'), positions: [ { averagePrice: new Big('75.80'), @@ -85,14 +85,14 @@ describe('PortfolioCalculator', () => { fee: new Big('4.25'), firstBuyDate: '2022-03-07', grossPerformance: new Big('21.93'), - grossPerformancePercentage: new Big('0.15113417083448194384'), + grossPerformancePercentage: new Big('0.14465699208443271768'), investment: new Big('75.80'), netPerformance: new Big('17.68'), - netPerformancePercentage: new Big('0.12184460284330327256'), + netPerformancePercentage: new Big('0.11662269129287598945'), marketPrice: 87.8, quantity: new Big('1'), symbol: 'NOVN.SW', - timeWeightedInvestment: new Big('145.10285714285714285714'), + tags: undefined, transactionCount: 2 } ], diff --git a/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell.spec.ts b/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell.spec.ts index 9838848a8..d0f009264 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell.spec.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell.spec.ts @@ -114,7 +114,7 @@ describe('PortfolioCalculator', () => { marketPrice: 87.8, quantity: new Big('0'), symbol: 'NOVN.SW', - timeWeightedInvestment: new Big('151.6'), + tags: undefined, transactionCount: 2 } ],