Browse Source

Test fixes

pull/5027/head
Daniel Devaud 2 years ago
parent
commit
8a53d42a5b
  1. 2
      apps/api/src/app/portfolio/portfolio-calculator-baln-buy-and-sell.spec.ts
  2. 2
      apps/api/src/app/portfolio/portfolio-calculator-baln-buy.spec.ts
  3. 10
      apps/api/src/app/portfolio/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts
  4. 10
      apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell-partially.spec.ts
  5. 2
      apps/api/src/app/portfolio/portfolio-calculator-novn-buy-and-sell.spec.ts

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

@ -92,7 +92,7 @@ describe('PortfolioCalculator', () => {
marketPrice: 148.9, marketPrice: 148.9,
quantity: new Big('0'), quantity: new Big('0'),
symbol: 'BALN.SW', symbol: 'BALN.SW',
timeWeightedInvestment: new Big('285.8'), tags: undefined,
transactionCount: 2 transactionCount: 2
} }
], ],

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

@ -81,7 +81,7 @@ describe('PortfolioCalculator', () => {
marketPrice: 148.9, marketPrice: 148.9,
quantity: new Big('2'), quantity: new Big('2'),
symbol: 'BALN.SW', symbol: 'BALN.SW',
timeWeightedInvestment: new Big('273.2'), tags: undefined,
transactionCount: 1 transactionCount: 1
} }
], ],

10
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'), currentValue: new Big('13657.2'),
errors: [], errors: [],
grossPerformance: new Big('27172.74'), grossPerformance: new Big('27172.74'),
grossPerformancePercentage: new Big('42.41978276196153750666'), grossPerformancePercentage: new Big('42.40043067128546016291'),
hasErrors: false, hasErrors: false,
netPerformance: new Big('27172.74'), netPerformance: new Big('27172.74'),
netPerformancePercentage: new Big('42.41978276196153750666'), netPerformancePercentage: new Big('42.40043067128546016291'),
positions: [ positions: [
{ {
averagePrice: new Big('320.43'), averagePrice: new Big('320.43'),
@ -85,14 +85,14 @@ describe('PortfolioCalculator', () => {
fee: new Big('0'), fee: new Big('0'),
firstBuyDate: '2015-01-01', firstBuyDate: '2015-01-01',
grossPerformance: new Big('27172.74'), grossPerformance: new Big('27172.74'),
grossPerformancePercentage: new Big('42.41978276196153750666'), grossPerformancePercentage: new Big('42.40043067128546016291'),
investment: new Big('320.43'), investment: new Big('320.43'),
netPerformance: new Big('27172.74'), netPerformance: new Big('27172.74'),
netPerformancePercentage: new Big('42.41978276196153750666'), netPerformancePercentage: new Big('42.40043067128546016291'),
marketPrice: 13657.2, marketPrice: 13657.2,
quantity: new Big('1'), quantity: new Big('1'),
symbol: 'BTCUSD', symbol: 'BTCUSD',
timeWeightedInvestment: new Big('640.56763686131386861314'), tags: undefined,
transactionCount: 2 transactionCount: 2
} }
], ],

10
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'), currentValue: new Big('87.8'),
errors: [], errors: [],
grossPerformance: new Big('21.93'), grossPerformance: new Big('21.93'),
grossPerformancePercentage: new Big('0.15113417083448194384'), grossPerformancePercentage: new Big('0.14465699208443271768'),
hasErrors: false, hasErrors: false,
netPerformance: new Big('17.68'), netPerformance: new Big('17.68'),
netPerformancePercentage: new Big('0.12184460284330327256'), netPerformancePercentage: new Big('0.11662269129287598945'),
positions: [ positions: [
{ {
averagePrice: new Big('75.80'), averagePrice: new Big('75.80'),
@ -85,14 +85,14 @@ describe('PortfolioCalculator', () => {
fee: new Big('4.25'), fee: new Big('4.25'),
firstBuyDate: '2022-03-07', firstBuyDate: '2022-03-07',
grossPerformance: new Big('21.93'), grossPerformance: new Big('21.93'),
grossPerformancePercentage: new Big('0.15113417083448194384'), grossPerformancePercentage: new Big('0.14465699208443271768'),
investment: new Big('75.80'), investment: new Big('75.80'),
netPerformance: new Big('17.68'), netPerformance: new Big('17.68'),
netPerformancePercentage: new Big('0.12184460284330327256'), netPerformancePercentage: new Big('0.11662269129287598945'),
marketPrice: 87.8, marketPrice: 87.8,
quantity: new Big('1'), quantity: new Big('1'),
symbol: 'NOVN.SW', symbol: 'NOVN.SW',
timeWeightedInvestment: new Big('145.10285714285714285714'), tags: undefined,
transactionCount: 2 transactionCount: 2
} }
], ],

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

@ -114,7 +114,7 @@ describe('PortfolioCalculator', () => {
marketPrice: 87.8, marketPrice: 87.8,
quantity: new Big('0'), quantity: new Big('0'),
symbol: 'NOVN.SW', symbol: 'NOVN.SW',
timeWeightedInvestment: new Big('151.6'), tags: undefined,
transactionCount: 2 transactionCount: 2
} }
], ],

Loading…
Cancel
Save