<commit_before>import {
  formatDate,
  formatMonth,
  formatMonthYear,
  formatShortWeekday,
  formatYear,
} from './dateFormatter';

describe('formatDate', () => {
  it('returns proper full numeric date', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatDate('en-US', date);

    expect(formattedDate).toBe('2/1/2017');
  });
});

describe('formatMonth', () => {
  it('returns proper month name', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatMonth('en-US', date);

    expect(formattedDate).toBe('February');
  });
});

describe('formatMonthYear', () => {
  it('returns proper month name and year', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatMonthYear('en-US', date);

    expect(formattedDate).toBe('February 2017');
  });
});

describe('formatShortWeekday', () => {
  it('returns proper short weekday name', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatShortWeekday('en-US', date);

    expect(formattedDate).toBe('Wed');
  });
});

describe('formatYear', () => {
  it('returns proper month name and year', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatYear('en-US', date);

    expect(formattedDate).toBe('2017');
  });
});<commit_msg>Add unit test for formatWeekday util<commit_after>import {
  formatDate,
  formatMonth,
  formatMonthYear,
  formatShortWeekday,
  formatWeekday,
  formatYear,
} from './dateFormatter';

describe('formatDate', () => {
  it('returns proper full numeric date', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatDate('en-US', date);

    expect(formattedDate).toBe('2/1/2017');
  });
});

describe('formatMonth', () => {
  it('returns proper month name', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatMonth('en-US', date);

    expect(formattedDate).toBe('February');
  });
});

describe('formatMonthYear', () => {
  it('returns proper month name and year', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatMonthYear('en-US', date);

    expect(formattedDate).toBe('February 2017');
  });
});

describe('formatShortWeekday', () => {
  it('returns proper short weekday name', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatShortWeekday('en-US', date);

    expect(formattedDate).toBe('Wed');
  });
});

describe('formatWeekday', () => {
  it('returns proper weekday name', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatWeekday('en-US', date);

    expect(formattedDate).toBe('Wednesday');
  });
});

describe('formatYear', () => {
  it('returns proper month name and year', () => {
    const date = new Date(2017, 1, 1);

    const formattedDate = formatYear('en-US', date);

    expect(formattedDate).toBe('2017');
  });
});
{'fraction_non_alphanumeric': 0.18687392055267704, 'fraction_numerical': 0.03246977547495682, 'mean_word_length': 3.9419795221843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, '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': '2209672', 'n_tokens_mistral': 1024, 'n_tokens_neox': 890, 'n_words': 212}