<commit_before>import getOptions from './options';

describe('Return comparison start date options', () => {
  let dateNowSpy;
  beforeAll(() => {
    dateNowSpy = jest.spyOn(Date, 'now').mockImplementation(() => new Date('2015-10-03'));
  });
  afterAll(() => {
    dateNowSpy.mockRestore();
  });

  it('has start dates in correct format', () => {
    const options = getOptions();

    expect(options).toEqual([
      { value: '2002-01-01', label: 'returnComparison.period.all' },
      { value: '2005-10-03', label: 'returnComparison.period.tenYears' },
      { value: '2010-10-03', label: 'returnComparison.period.fiveYears' },
      { value: '2012-10-03', label: 'returnComparison.period.threeYears' },
      { value: '2014-10-03', label: 'returnComparison.period.oneYear' },
      // { value: '2010-01-01', label: 'returnComparison.period.thisYear' },
    ]);
  });
});<commit_msg>add 2 year IRR test<commit_after>import getOptions from './options';

describe('Return comparison start date options', () => {
  let dateNowSpy;
  beforeAll(() => {
    dateNowSpy = jest.spyOn(Date, 'now').mockImplementation(() => new Date('2015-10-03'));
  });
  afterAll(() => {
    dateNowSpy.mockRestore();
  });

  it('has start dates in correct format', () => {
    const options = getOptions();

    expect(options).toEqual([
      { value: '2002-01-01', label: 'returnComparison.period.all' },
      { value: '2005-10-03', label: 'returnComparison.period.tenYears' },
      { value: '2010-10-03', label: 'returnComparison.period.fiveYears' },
      { value: '2012-10-03', label: 'returnComparison.period.threeYears' },
      { value: '2013-10-03', label: 'returnComparison.period.twoYears' },
      { value: '2014-10-03', label: 'returnComparison.period.oneYear' },
      // { value: '2010-01-01', label: 'returnComparison.period.thisYear' },
    ]);
  });
});
{'fraction_non_alphanumeric': 0.19504310344827586, 'fraction_numerical': 0.06519396551724138, 'mean_word_length': 3.630922693266833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5523455', 'n_tokens_mistral': 681, 'n_tokens_neox': 600, 'n_words': 114}