<commit_before>const assert = require('assert');
const MonorepoChangelog = require('./index.js');

describe('monorepoChangelog', () => {
  it('should thow an error if monoRepoPath doesn\'t exist', () => {
    assert.throws(() => {
      // eslint-disable-next-line no-unused-vars
      const monorepoChangelog = new MonorepoChangelog({
        monoRepoPath: `${__dirname}/directoryDoesNotExist`
      });
    }, Error);
  });

  it('should return an empty string if no changelog files found', () => {
    const monorepoChangelog = new MonorepoChangelog();
    assert.equal('', monorepoChangelog.getChangelog());
  });

  it('should return non-empty changelog', () => {
    const monorepoChangelog = new MonorepoChangelog({
      monoRepoPath: `${__dirname}/../../markup`
    });
    assert.ok(monorepoChangelog.getChangelog());
  });

  it('should write a file', () => {
    const monorepoChangelog = new MonorepoChangelog({
      monoRepoPath: `${__dirname}/../../markup`,
      outputPath: `${__dirname}/../output`,
      startDate: '2017-04-23'
    });<commit_msg>Fix a typo in a test case description<commit_after>const assert = require('assert');
const MonorepoChangelog = require('./index.js');

describe('monorepoChangelog', () => {
  it('should throw an error if monoRepoPath doesn\'t exist', () => {
    assert.throws(() => {
      // eslint-disable-next-line no-unused-vars
      const monorepoChangelog = new MonorepoChangelog({
        monoRepoPath: `${__dirname}/directoryDoesNotExist`
      });
    }, Error);
  });

  it('should return an empty string if no changelog files found', () => {
    const monorepoChangelog = new MonorepoChangelog();
    assert.equal('', monorepoChangelog.getChangelog());
  });

  it('should return non-empty changelog', () => {
    const monorepoChangelog = new MonorepoChangelog({
      monoRepoPath: `${__dirname}/../../markup`
    });
    assert.ok(monorepoChangelog.getChangelog());
  });

  it('should write a file', () => {
    const monorepoChangelog = new MonorepoChangelog({
      monoRepoPath: `${__dirname}/../../markup`,
      outputPath: `${__dirname}/../output`,
      startDate: '2017-04-23'
    });
{'fraction_non_alphanumeric': 0.16859657248726262, 'fraction_numerical': 0.007410838351088467, 'mean_word_length': 3.4628099173553717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '6768907', 'n_tokens_mistral': 708, 'n_tokens_neox': 703, 'n_words': 139}