Skip to content

Commit

Permalink
Additional JERQ/DDF "getProducerSymbol" tests for futures options (e.…
Browse files Browse the repository at this point in the history
…g. ZCN22|800P)
  • Loading branch information
bryaningl3 committed May 4, 2022
1 parent b430965 commit 50e2006
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/specs/utilities/parsers/SymbolParserSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2780,6 +2780,42 @@ describe('When getting a producer symbol', () => {
expect(producerSymbol).toEqual('ZWK465X');
});
});

describe('When testing ZCN22|800P in 2022', () => {
let producerSymbol;

beforeEach(() => {
let getFullYear = Date.prototype.getFullYear;

Date.prototype.getFullYear = () => { return 2022; };

producerSymbol = SymbolParser.getProducerSymbol('ZCN22|800P');

Date.prototype.getFullYear = getFullYear;
});

it('ZCN22|800P should map to ZCN800P', () =>{
expect(producerSymbol).toEqual('ZCN800P');
});
});

describe('When testing ZCN2|800P in 2022', () => {
let producerSymbol;

beforeEach(() => {
let getFullYear = Date.prototype.getFullYear;

Date.prototype.getFullYear = () => { return 2022; };

producerSymbol = SymbolParser.getProducerSymbol('ZCN2|800P');

Date.prototype.getFullYear = getFullYear;
});

it('ZCN2|800P should map to ZCN800P', () =>{
expect(producerSymbol).toEqual('ZCN800P');
});
});
});
});

Expand Down

0 comments on commit 50e2006

Please sign in to comment.