@barchart/portfolio-api-common 1.0.164 → 1.0.168

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,7 @@ const InstrumentType = require('./../../../lib/data/InstrumentType');
5
5
 
6
6
  const PositionContainer = require('./../../../lib/processing/PositionContainer'),
7
7
  PositionLevelDefinition = require('./../../../lib/processing/definitions/PositionLevelDefinition'),
8
+ PositionLevelType = require('./../../../lib/processing/definitions/PositionLevelType'),
8
9
  PositionTreeDefinition = require('./../../../lib/processing/definitions/PositionTreeDefinition');
9
10
 
10
11
  describe('When a position container data is gathered', () => {
@@ -66,9 +67,9 @@ describe('When a position container data is gathered', () => {
66
67
  beforeEach(() => {
67
68
  definitions = [
68
69
  new PositionTreeDefinition(name = 'the only tree', [
69
- new PositionLevelDefinition('Total', x => 'totals', x => 'Total', x => Currency.CAD),
70
- new PositionLevelDefinition('Portfolio', x => x.portfolio.portfolio, x => x.portfolio.name, x => Currency.CAD),
71
- new PositionLevelDefinition('Position', x => x.position.position, x => x.position.instrument.symbol.barchart, x => x.position.instrument.currency)
70
+ new PositionLevelDefinition('Total', PositionLevelType.OTHER, x => 'totals', x => 'Total', x => Currency.CAD),
71
+ new PositionLevelDefinition('Portfolio', PositionLevelType.PORTFOLIO, x => x.portfolio.portfolio, x => x.portfolio.name, x => Currency.CAD),
72
+ new PositionLevelDefinition('Position', PositionLevelType.POSITION, x => x.position.position, x => x.position.instrument.symbol.barchart, x => x.position.instrument.currency)
72
73
  ])
73
74
  ];
74
75