<commit_before>var exec = require('child_process').exec;
var expect = require('chai').expect;
var TempDir = require('temporary').Dir;
var wrench = require('wrench');
var cliPresentationPath = __dirname + '/../bin/cli-presentation';

describe('A cli-presentation', function () {
  // Create temporary directory to test within
  before(function () {
    this.tmpDir = new TempDir();
    this.tmpPath = this.tmpDir.path;
  });
  after(function (done) {
    // DEV: We cannot use temporary to clean up since it won't be empty
    wrench.rmdirRecursive(this.tmpPath, done);
  });

  // Copy over our temp files
  before(function (done) {
    wrench.copyDirRecursive(__dirname + '/test-files/multi', this.tmpPath, {
      forceDelete: true
    }, done);
  });

  // Navigate to the temporary directory
  before(function () {
    process.chdir(this.tmpPath);
  });

  it('starts on the first slide (current)', function (done) {
    exec(cliPresentationPath, function (err, stdout, stderr) {
      if (err) { return done(err); }
      expect(stdout).to.equal('11111111\n');
      done();
    });
  });

  it('starts on the first slide (overview)', function (done) {
    // Run `cli-presentation status` and assert output
    exec(cliPresentationPath + ' status', function (err, stdout, stderr) {
      if (err) { return done(err); }
      expect(stdout).to.equal([
        '* 0 1.js',
        '  1 2.js',
        '  2 3.js',
        ''
      ].join('\n'));
      done();
    });
  });

});
<commit_msg>Completed second slide iteration<commit_after>var exec = require('child_process').exec;
var expect = require('chai').expect;
var TempDir = require('temporary').Dir;
var wrench = require('wrench');
var cliPresentationPath = __dirname + '/../bin/cli-presentation';

describe('A cli-presentation', function () {
  // Create temporary directory to test within
  before(function () {
    this.tmpDir = new TempDir();
    this.tmpPath = this.tmpDir.path;
  });
  after(function (done) {
    // DEV: We cannot use temporary to clean up since it won't be empty
    wrench.rmdirRecursive(this.tmpPath, done);
  });

  // Copy over our temp files
  before(function (done) {
    wrench.copyDirRecursive(__dirname + '/test-files/multi', this.tmpPath, {
      forceDelete: true
    }, done);
  });

  // Navigate to the temporary directory
  before(function () {
    process.chdir(this.tmpPath);
  });

  it('starts on the first slide (current)', function (done) {
    // Get the first slide as the current slide
    exec(cliPresentationPath, function (err, stdout, stderr) {
      if (err) { return done(err); }
      expect(stdout).to.equal('11111111\n');
      done();
    });
  });

  it('starts on the first slide (overview)', function (done) {
    // Run `cli-presentation status` and assert output
    exec(cliPresentationPath + ' status', function (err, stdout, stderr) {
      if (err) { return done(err); }
      expect(stdout).to.equal([
        '* 0 1.js',
        '  1 2.js',
        '  2 3.js',
        ''
      ].join('\n'));
      done();
    });
  });

  describe('moving to the next slide', function () {
    before(function (done) {
      var that = this;
      exec(cliPresentationPath + ' next', function (err, stdout, stderr) {
        that.stdout = stdout;
        that.stderr = stderr;
        done(err);
      });
    });

    it('outputs the second slides contents', function () {
      expect(this.stdout).to.equal('twotwotwo\n');
    });
  });

  // DEV: If we want to regression test `next` and `back` not exceeding
  // boundaries, place those in an edge case test suite
});

{'fraction_non_alphanumeric': 0.15448968209704406, 'fraction_numerical': 0.007808142777467931, 'mean_word_length': 2.882034632034632, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '494668', 'n_tokens_mistral': 1153, 'n_tokens_neox': 1103, 'n_words': 303}