<commit_before>var Mocha = require('mocha'),
    _ = require('underscore');

module.exports = function (browser, module, suite /*, config*/) {

  var tests = {

    'has a description': function () {
      return browser
        .$('#' + module.slug + ' h3').text()
          .should.eventually.equal(module.description);
    },

    'has a percentage value': function () {
      return browser
        .$('#' + module.slug + ' .stat strong').text()
          .should.eventually.match(/^([0-9\.]+%)|(no data)$/);
    },

    'has a delta value': function () {
      return browser
        .$('#' + module.slug + ' .delta .impact-number').text()
          // this regex may look odd, but one is hyphen, the other is \u2212
          // http://www.fileformat.info/info/unicode/char/2212/index.htm
          .should.eventually.match(/^((-|−)?[0-9\.]+%)|(no change)$/);
    }

  };

  _.each(tests, function (test, key) {
    suite.addTest(new Mocha.Test(key, test));
  });

};<commit_msg>Deltas can have + prefixes too<commit_after>var Mocha = require('mocha'),
    _ = require('underscore');

module.exports = function (browser, module, suite /*, config*/) {

  var tests = {

    'has a description': function () {
      return browser
        .$('#' + module.slug + ' h3').text()
          .should.eventually.equal(module.description);
    },

    'has a percentage value': function () {
      return browser
        .$('#' + module.slug + ' .stat strong').text()
          .should.eventually.match(/^([0-9\.]+%)|(no data)$/);
    },

    'has a delta value': function () {
      return browser
        .$('#' + module.slug + ' .delta .impact-number').text()
          // this regex may look odd, but one is hyphen, the other is \u2212
          // http://www.fileformat.info/info/unicode/char/2212/index.htm
          .should.eventually.match(/^((\+|-|−)?[0-9\.]+%)|(no change)$/);
    }

  };

  _.each(tests, function (test, key) {
    suite.addTest(new Mocha.Test(key, test));
  });

};
{'fraction_non_alphanumeric': 0.20100502512562815, 'fraction_numerical': 0.01306532663316583, 'mean_word_length': 2.33500837520938, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3297274', 'n_tokens_mistral': 674, 'n_tokens_neox': 642, 'n_words': 136}