<commit_before>var assert = require('assert'),
    fs = require('fs'),
    path = require('path'),
    sass = require('../sass');

var normalize = function(text) {
  return text.replace(/\s+/g, '').replace('{', '{\n').replace(';', ';\n');
};

describe('sass-spec', function() {
  var sassSpecPath = path.join(__dirname, 'sass-spec'),
      sassSpecDirExists = fs.existsSync(sassSpecPath);

  describe('test directory', function() {
    it('it should exist', function() {
      assert.ok(sassSpecDirExists);
    });
  });

  if (sassSpecDirExists) {
    var suitesPath = path.join(sassSpecPath, 'spec');
    var suites = fs.readdirSync(suitesPath);<commit_msg>Add warning when sass-spec directory is not present<commit_after>var assert = require('assert'),
    fs = require('fs'),
    path = require('path'),
    sass = require('../sass');

var normalize = function(text) {
  return text.replace(/\s+/g, '').replace('{', '{\n').replace(';', ';\n');
};

describe('sass-spec', function() {
  var sassSpecPath = path.join(__dirname, 'sass-spec'),
      sassSpecDirExists = fs.existsSync(sassSpecPath);

  describe('spec directory', function() {
    it('should be a cloned into place', function() {
      try {
        assert.ok(sassSpecDirExists);
      } catch (e) {
        console.log([
          'test/sass-spec directory missing. Please clone it into place by',
          'executing `git submodule update --init --recursive test/sass-spec`',
          'from the project\'s root directory.'
        ].join(' '));

        throw e;
      }
    });
  });

  if (sassSpecDirExists) {
    var suitesPath = path.join(sassSpecPath, 'spec');
    var suites = fs.readdirSync(suitesPath);
{'fraction_non_alphanumeric': 0.18046456223942822, 'fraction_numerical': 0.0, 'mean_word_length': 3.2748091603053435, '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': '7441423', 'n_tokens_mistral': 551, 'n_tokens_neox': 533, 'n_words': 121}