<commit_before>var path = require('path');
var should = require('chai').should();
var assert = require('chai').assert;
var Animal = require(path.join(process.cwd(), '/lib/Animal'));
var Cheer = require(path.join(process.cwd(), '/lib/cheer'));
var cp = require('child_process');
var fs = require('fs');

describe('Tests', function() {
  it('truthyness', function() {
    true.should.equal(true);
  });
});

describe('cheer', function() {

  var cheer = new Cheer();

  it('should print help if help is called', function(done) {
    cp.execFile('./app.js', ['--help'], function(err,stdout) {
      var options = { encoding : 'utf8' };
      var msg = fs.readFileSync('./lib/help_message.txt',options);
      assert.equal(stdout,msg);
      done();
    });
  });

  it('should print help if no flags are passed', function(done) {
    cp.execFile('./app.js', function(err,stdout) {
      var options = { encoding : 'utf8' };
      var msg = fs.readFileSync('./lib/help_message.txt',options);
      assert.equal(stdout,msg);
      done();
    });
  });

  it('should print lowercase in uppercase', function(done) {
    cp.execFile('./app.js', ['a'], function(err,stdout) {
      var output = 'Gimme an A!\n';
      assert.equal(stdout,output);
      done();
    });
  });

  it('should have an "a" before a consonant', function(done) {
    'BCDGJKPQTUVWYZ'
      .split('')
      .forEach(function(char) {
        cheer.article(char).should.equal('a ');;
      });
    done();
  });

  it('should return a phrase with the character as a capital', function() {
    var char = 'a';
    var output = 'Gimme an A!\n';
    assert.equal(cheer.phrase(char),output);
  });

  it('should print a cheer if a name is put in', function(done) {
    cp.execFile('./app.js', ['Abc'], function(err,stdout) {
      var output = 'Gimme an A!\nGimme a  B!\nGimme a  C!\n';
      assert.equal(stdout,output);
      done();
    });
  });

});

describe('Animal', function() {<commit_msg>Implementing changed filename in test file, as well as organizing and rewriting tests.<commit_after>var path = require('path');
var should = require('chai').should();
var assert = require('chai').assert;
var Animal = require(path.join(process.cwd(), '/lib/Animal'));
var Cheerleader = require(path.join(process.cwd(), '/lib/cheer'));
var cp = require('child_process');
var fs = require('fs');

describe('Tests', function() {
  it('truthyness', function() {
    true.should.equal(true);
  });
});

describe('cheer', function() {

  var cheerleader = new Cheerleader();

  it('should return a phrase with the character as a capital', function() {
    var char = 'a';
    assert.equal(cheerleader.upper(char),output);
  });

  it('should have an "a" before a consonant', function(done) {
    'BCDGJKPQTUVWYZ'
      .split('')
      .forEach(function(char) {
        cheer.article(char).should.equal('a ');;
      });
    done();
  });

  it('should print a cheer if a name is put in', function(done) {
    cp.execFile('./app.js', ['Abc'], function(err,stdout) {
      var output = 'Gimme an A!\nGimme a  B!\nGimme a  C!\n';
      assert.equal(stdout,output);
      done();
    });
  });

  it('should print help if help is called', function(done) {
    cp.execFile('./app.js', ['--help'], function(err,stdout) {
      var options = { encoding : 'utf8' };
      var msg = fs.readFileSync('./lib/help_message.txt',options);
      assert.equal(stdout,msg);
      done();
    });
  });

  it('should print help if no flags are passed', function(done) {
    cp.execFile('./app.js', function(err,stdout) {
      var options = { encoding : 'utf8' };
      var msg = fs.readFileSync('./lib/help_message.txt',options);
      assert.equal(stdout,msg);
      done();
    });
  });

});

describe('Animal', function() {
{'fraction_non_alphanumeric': 0.19176626826029217, 'fraction_numerical': 0.0010624169986719787, 'mean_word_length': 3.2941847206385404, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6761328', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1218, 'n_words': 295}