<commit_before>var assert = require('assert');
var fs = require('fs');
var exec = require('child_process').exec;

describe('grunt', function() {
  describe('default', function() {

    // Ensure the vendor directory exists.
    it('it should create the vendor directory', function(done) {
      fs.exists('vendor', function (exists) {
        assert.ok(exists);
        done();
      });
    });

    // Ensure the build/html directory exists.
    it('it should create the build/html directory', function(done) {
      fs.exists('build/html', function (exists) {
        assert.ok(exists);
        done();
      });
    });

    // Ensure build/html/index.php exists and that index.php can be executed
    // with PHP.
    it('it should build a runnable Drupal docroot', function(done) {
      fs.exists('build/html/index.php', function (exists) {
        assert.ok(exists);

        if (exists) {
          process.chdir('build/html');
          exec('php index.php', function (error, stdout, stderr) {
            var testDrupalRan = (error === null);
            process.chdir('../..');
            assert.ok(testDrupalRan, "Drupal's index.php could be executed with PHP");
            done();
          });
        }
        else {
          done();
        }
      });
    });

    // Ensure the build/html/sites/all/modules/custom directory is a symlink to
    // ../../../../../src/modules.
    it('it should link the build/html/sites/all/modules/custom directory', function(done) {
      fs.lstat('build/html/sites/all/modules/custom', function (err, stats) {
        assert.ok(stats.isSymbolicLink());

        if (stats.isSymbolicLink()) {
          fs.readlink('build/html/sites/all/modules/custom', function (err, linkString) {
            assert.equal(linkString, '../../../../../src/modules');
            done();
          });
        }
        else {
          done();
        }
      });
    });

    // Ensure the build/html/sites/all/themes/custom/example_theme/stylesheets/screen.css
    // file exists, which should be created by compass.
    it('it should compile sass files', function(done) {
      fs.exists('build/html/sites/all/themes/custom/example_theme/stylesheets/screen.css', function (exists) {
        assert.ok(exists);
        done();
      });
    });

  });<commit_msg>Updating Mocha test for Drupal 8 paths.<commit_after>var assert = require('assert');
var fs = require('fs');
var exec = require('child_process').exec;

describe('grunt', function() {
  describe('default', function() {

    // Ensure the vendor directory exists.
    it('it should create the vendor directory', function(done) {
      fs.exists('vendor', function (exists) {
        assert.ok(exists);
        done();
      });
    });

    // Ensure the build/html directory exists.
    it('it should create the build/html directory', function(done) {
      fs.exists('build/html', function (exists) {
        assert.ok(exists);
        done();
      });
    });

    // Ensure build/html/index.php exists and that index.php can be executed
    // with PHP.
    it('it should build a runnable Drupal docroot', function(done) {
      fs.exists('build/html/index.php', function (exists) {
        assert.ok(exists);

        if (exists) {
          process.chdir('build/html');
          exec('php index.php', function (error, stdout, stderr) {
            var testDrupalRan = (error === null);
            process.chdir('../..');
            assert.ok(testDrupalRan, "Drupal's index.php could be executed with PHP");
            done();
          });
        }
        else {
          done();
        }
      });
    });

    // Ensure the build/html/modules/custom directory is a symlink to
    // ../../../src/modules.
    it('it should link the build/html/modules/custom directory', function(done) {
      fs.lstat('build/html/modules/custom', function (err, stats) {
        assert.ok(stats.isSymbolicLink());

        if (stats.isSymbolicLink()) {
          fs.readlink('build/html/modules/custom', function (err, linkString) {
            assert.equal(linkString, '../../../src/modules');
            done();
          });
        }
        else {
          done();
        }
      });
    });

    // Ensure the build/html/themes/custom/example_theme/stylesheets/screen.css
    // file exists, which should be created by Compass.
    it('it should compile scss/sass files', function(done) {
      fs.exists('build/html/themes/custom/example_theme/stylesheets/screen.css', function (exists) {
        assert.ok(exists, 'compiled CSS file screen.css not found');
        done();
      });
    });

  });
{'fraction_non_alphanumeric': 0.157381313678734, 'fraction_numerical': 0.00021677866897897247, 'mean_word_length': 2.1430517711171664, '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': '2074508', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1315, 'n_words': 310}