Browse Source

Improve tests

pull/3393/head
Thomas Kaul 1 year ago
parent
commit
3ce0830cc2
  1. 3
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts
  2. 3
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-baln-buy-and-sell.spec.ts
  3. 3
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-baln-buy.spec.ts
  4. 3
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts
  5. 1
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-fee.spec.ts
  6. 3
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-googl-buy.spec.ts
  7. 1
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-item.spec.ts
  8. 3
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-novn-buy-and-sell-partially.spec.ts
  9. 3
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-novn-buy-and-sell.spec.ts

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

@ -177,6 +177,9 @@ describe('PortfolioCalculator', () => {
netPerformancePercentageWithCurrencyEffect: new Big( netPerformancePercentageWithCurrencyEffect: new Big(
'-0.05528341497550734703' '-0.05528341497550734703'
), ),
netPerformancePercentageWithCurrencyEffectMap: {
max: new Big('-0.18658152554233729881') // TODO: Different
},
netPerformanceWithCurrencyEffect: new Big('-15.8'), netPerformanceWithCurrencyEffect: new Big('-15.8'),
netPerformanceWithCurrencyEffectMap: { netPerformanceWithCurrencyEffectMap: {
max: new Big('-15.8') max: new Big('-15.8')

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

@ -162,6 +162,9 @@ describe('PortfolioCalculator', () => {
netPerformancePercentageWithCurrencyEffect: new Big( netPerformancePercentageWithCurrencyEffect: new Big(
'-0.0552834149755073478' '-0.0552834149755073478'
), ),
netPerformancePercentageWithCurrencyEffectMap: {
max: new Big('-0.18658152554233729881') // TODO: Different
},
netPerformanceWithCurrencyEffect: new Big('-15.8'), netPerformanceWithCurrencyEffect: new Big('-15.8'),
netPerformanceWithCurrencyEffectMap: { netPerformanceWithCurrencyEffectMap: {
max: new Big('-15.8') max: new Big('-15.8')

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

@ -147,6 +147,9 @@ describe('PortfolioCalculator', () => {
netPerformancePercentageWithCurrencyEffect: new Big( netPerformancePercentageWithCurrencyEffect: new Big(
'0.08437042459736456808' '0.08437042459736456808'
), ),
netPerformancePercentageWithCurrencyEffectMap: {
max: new Big('0.08437042459736456808')
},
netPerformanceWithCurrencyEffect: new Big('23.05'), netPerformanceWithCurrencyEffect: new Big('23.05'),
netPerformanceWithCurrencyEffectMap: { netPerformanceWithCurrencyEffectMap: {
max: new Big('23.05') max: new Big('23.05')

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

@ -179,6 +179,9 @@ describe('PortfolioCalculator', () => {
netPerformancePercentageWithCurrencyEffect: new Big( netPerformancePercentageWithCurrencyEffect: new Big(
'41.64017412624815595315' '41.64017412624815595315'
), ),
netPerformancePercentageWithCurrencyEffectMap: {
max: new Big('41.65910103572163194783')
},
netPerformanceWithCurrencyEffect: new Big( netPerformanceWithCurrencyEffect: new Big(
'26516.208701400000064086' '26516.208701400000064086'
), ),

1
apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-fee.spec.ts

@ -130,6 +130,7 @@ describe('PortfolioCalculator', () => {
netPerformance: null, netPerformance: null,
netPerformancePercentage: null, netPerformancePercentage: null,
netPerformancePercentageWithCurrencyEffect: null, netPerformancePercentageWithCurrencyEffect: null,
netPerformancePercentageWithCurrencyEffectMap: null,
netPerformanceWithCurrencyEffect: null, netPerformanceWithCurrencyEffect: null,
netPerformanceWithCurrencyEffectMap: null, netPerformanceWithCurrencyEffectMap: null,
quantity: new Big('0'), quantity: new Big('0'),

3
apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-googl-buy.spec.ts

@ -160,6 +160,9 @@ describe('PortfolioCalculator', () => {
netPerformancePercentageWithCurrencyEffect: new Big( netPerformancePercentageWithCurrencyEffect: new Big(
'0.24112962014285697628' '0.24112962014285697628'
), ),
netPerformancePercentageWithCurrencyEffectMap: {
max: new Big('0.24112962014285697628')
},
netPerformanceWithCurrencyEffect: new Big('19.851974'), netPerformanceWithCurrencyEffect: new Big('19.851974'),
netPerformanceWithCurrencyEffectMap: { netPerformanceWithCurrencyEffectMap: {
max: new Big('19.851974') max: new Big('19.851974')

1
apps/api/src/app/portfolio/calculator/twr/portfolio-calculator-item.spec.ts

@ -130,6 +130,7 @@ describe('PortfolioCalculator', () => {
netPerformance: null, netPerformance: null,
netPerformancePercentage: null, netPerformancePercentage: null,
netPerformancePercentageWithCurrencyEffect: null, netPerformancePercentageWithCurrencyEffect: null,
netPerformancePercentageWithCurrencyEffectMap: null,
netPerformanceWithCurrencyEffect: null, netPerformanceWithCurrencyEffect: null,
netPerformanceWithCurrencyEffectMap: null, netPerformanceWithCurrencyEffectMap: null,
quantity: new Big('0'), quantity: new Big('0'),

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

@ -162,6 +162,9 @@ describe('PortfolioCalculator', () => {
netPerformancePercentageWithCurrencyEffect: new Big( netPerformancePercentageWithCurrencyEffect: new Big(
'0.12184460284330327256' '0.12184460284330327256'
), ),
netPerformancePercentageWithCurrencyEffectMap: {
max: new Big('0.12348284960422163588')
},
netPerformanceWithCurrencyEffect: new Big('17.68'), netPerformanceWithCurrencyEffect: new Big('17.68'),
netPerformanceWithCurrencyEffectMap: { netPerformanceWithCurrencyEffectMap: {
max: new Big('17.68') max: new Big('17.68')

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

@ -192,6 +192,9 @@ describe('PortfolioCalculator', () => {
netPerformancePercentageWithCurrencyEffect: new Big( netPerformancePercentageWithCurrencyEffect: new Big(
'0.13100263852242744063' '0.13100263852242744063'
), ),
netPerformancePercentageWithCurrencyEffectMap: {
max: new Big('0.14737796833773087071')
},
netPerformanceWithCurrencyEffect: new Big('19.86'), netPerformanceWithCurrencyEffect: new Big('19.86'),
netPerformanceWithCurrencyEffectMap: { netPerformanceWithCurrencyEffectMap: {
max: new Big('19.86') max: new Big('19.86')

Loading…
Cancel
Save