<commit_before>var should = require('chai').should(),
    expect = require('chai').expect,
    getDateRange = require('../index');

describe('getDateRange', function() {
  it('returns an array of dates based on startDate and end Date', function() {
    getDateRange('09/01/2016', '09/30/2016').should.be.a('Array');
  });

  it('should throw an error for invalid startDate', function() {
    expect(function () { getDateRange('malformed date', '09/30/2016') }).to.throw(Error);
  });

  it('should throw an error for invalid endDate', function() {
    expect(function() { getDateRange('09/01/2016', 'malformed date') }).to.throw(Error);
  });

  it('should return the correct array based on the format', function() {
    const correctOutput = [ 'Sep 30',
      'Sep 29',
      'Sep 28',
      'Sep 27',
      'Sep 26',
      'Sep 25',
      'Sep 24',
      'Sep 23',
      'Sep 22',
      'Sep 21',
      'Sep 20',
      'Sep 19',
      'Sep 18',
      'Sep 17',
      'Sep 16',
      'Sep 15',
      'Sep 14',
      'Sep 13',
      'Sep 12',
      'Sep 11',
      'Sep 10',
      'Sep 09',
      'Sep 08',
      'Sep 07',
      'Sep 06',
      'Sep 05',
      'Sep 04',
      'Sep 03',
      'Sep 02',
      'Sep 01' ];

    getDateRange('09/01/2016', '09/30/2016', 'MMM DD').should.be.eql(correctOutput);
  });
});<commit_msg>adds another test for the fourth param<commit_after>var should = require('chai').should(),
    expect = require('chai').expect,
    getDateRange = require('../index');

describe('getDateRange', function() {
  it('returns an array of dates based on startDate and end Date', function() {
    getDateRange('09/01/2016', '09/30/2016').should.be.a('Array');
  });

  it('should throw an error for invalid startDate', function() {
    expect(function () { getDateRange('malformed date', '09/30/2016') }).to.throw(Error);
  });

  it('should throw an error for invalid endDate', function() {
    expect(function() { getDateRange('09/01/2016', 'malformed date') }).to.throw(Error);
  });

  it('should return the correct array based on the format', function() {
    const correctOutput = [ 'Sep 05', 'Sep 04', 'Sep 03', 'Sep 02', 'Sep 01' ];

    getDateRange('09/01/2016', '09/05/2016', 'MMM DD').should.be.eql(correctOutput);
  });

  it('should return an array sorted in ascending order if last param is true", function() {
    const correctOutput = [ 'Sep 01', 'Sep 02', 'Sep 03', 'Sep 04', 'Sep 05' ];

    getDateRange('09/01/2016', '09/05/2016', 'MMM DD', true).should.be.eql(correctOutput);
  });
});
{'fraction_non_alphanumeric': 0.1875, 'fraction_numerical': 0.0759493670886076, 'mean_word_length': 3.0399361022364215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4388626', 'n_tokens_mistral': 982, 'n_tokens_neox': 815, 'n_words': 237}